Skip to content

Commit

Permalink
debug(iter-1)!: gh workflow for e2e
Browse files Browse the repository at this point in the history
added e2e tests without migration

Signed-off-by: Dipankar Das <[email protected]>
  • Loading branch information
dipankardas011 committed May 28, 2024
1 parent 5b8fae1 commit 07a7db5
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 22 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/e2e-migration.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: E2E on push event
name: E2E migration testing

on:
push:
Expand Down Expand Up @@ -34,3 +34,16 @@ jobs:
- name: frappe version
run: fm --version

# - name: e2e run
# timeout-minutes: 20
# working-directory: test
# run: |
# ./e2e-test.sh


- name: cleanup
if: always()
run: |
python -m pip uninstall -y frappe-manager
sudo rm -rf ~/frappe
14 changes: 13 additions & 1 deletion .github/workflows/e2e-site.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: E2E on push event
name: E2E site testing

on:
push:
Expand Down Expand Up @@ -34,4 +34,16 @@ jobs:
- name: frappe version
run: fm --version

- name: e2e run
timeout-minutes: 20
working-directory: test
run: |
./e2e_test.sh
- name: cleanup
if: always()
run: |
python -m pip uninstall -y frappe-manager
sudo rm -rf ~/frappe
8 changes: 4 additions & 4 deletions test/e2e_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ source ${PWD}/fm.sh
source ${PWD}/helpers.sh

cd ~
echo "Frappe executing $PWD"
source env/bin/activate # make sure the envirnment variable is set
# echo "Frappe executing $PWD"
# source env/bin/activate # make sure the envirnment variable is set

main() {
echo "
Expand All @@ -18,8 +18,8 @@ main() {
┡━━━━━━━━━━━━━━━━━━━━━━━┩
"
Prequisites
Cleanup
InstallFrappe "main"
#Cleanup
#InstallFrappe "main"

CreateSite "test-site.prod.local" prod
CreateSite "test-site.dev.local" dev
Expand Down
32 changes: 16 additions & 16 deletions test/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ Cleanup() {
sudo rm -rf ~/frappe
}

InstallFrappe() {
local tagOrBranch=$1
if [ -d ~/Frappe-Manager ]; then
echo "Frappe git is already there already installed. Skipping. clone"
else
git clone https://github.com/rtCamp/Frappe-Manager.git
fi
cd ~/Frappe-Manager
git fetch --all
if [ -n "$tagOrBranch" ]; then
git checkout $tagOrBranch
fi
cd -
python -m pip install --upgrade ./Frappe-Manager
fm --version
}
# InstallFrappe() {
# local tagOrBranch=$1
# if [ -d ~/Frappe-Manager ]; then
# echo "Frappe git is already there already installed. Skipping. clone"
# else
# git clone https://github.com/rtCamp/Frappe-Manager.git
# fi
# cd ~/Frappe-Manager
# git fetch --all
# if [ -n "$tagOrBranch" ]; then
# git checkout $tagOrBranch
# fi
# cd -
# python -m pip install --upgrade ./Frappe-Manager
# fm --version
# }


Prequisites() {
Expand Down

0 comments on commit 07a7db5

Please sign in to comment.