From 5b8fae1c02a4f6b75d74326565f2deb854a95e3a Mon Sep 17 00:00:00 2001 From: Dipankar Das <65275144+dipankardas011@users.noreply.github.com> Date: Tue, 28 May 2024 13:15:37 +0530 Subject: [PATCH] debug(iter-0)!: gh workflow for e2e Signed-off-by: Dipankar Das <65275144+dipankardas011@users.noreply.github.com> --- .github/workflows/e2e-migration.yml | 36 ++++++++++++++++++++++++++++ .github/workflows/e2e-push.yaml | 32 ------------------------- .github/workflows/e2e-site.yaml | 37 +++++++++++++++++++++++++++++ test/helpers.sh | 10 +------- 4 files changed, 74 insertions(+), 41 deletions(-) create mode 100644 .github/workflows/e2e-migration.yml delete mode 100644 .github/workflows/e2e-push.yaml create mode 100644 .github/workflows/e2e-site.yaml diff --git a/.github/workflows/e2e-migration.yml b/.github/workflows/e2e-migration.yml new file mode 100644 index 00000000..5df944cf --- /dev/null +++ b/.github/workflows/e2e-migration.yml @@ -0,0 +1,36 @@ +name: E2E on push event + +on: + push: + tags: + - v* + branches: + - main + - develop + - feat-add-e2e-test # TODO(user): remove it + workflow_dispatch: + +jobs: + e2e-current: + name: e2e current latest branch + runs-on: ubuntu-latest + + strategy: + matrix: + python-ver: ["3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-ver }} + + - name: install frappe from v0.9.0 + run: | + cd /tmp + python -m pip install -U git+https://github.com/rtCamp/Frappe-Manager.git@v0.9.0 + + - name: frappe version + run: fm --version + diff --git a/.github/workflows/e2e-push.yaml b/.github/workflows/e2e-push.yaml deleted file mode 100644 index 656afa2a..00000000 --- a/.github/workflows/e2e-push.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: E2E on push event - -on: - push: - tags: - - v* - branches: - - main - - develop - workflow_dispatch: - -jobs: - e2e-current: - name: e2e current latest branch - runs-on: ubuntu-latest - - - strategy: - matrix: - python-ver: ["3.11", "3.12"] - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-ver }} - - - name: test e2e simple - run: echo "TODO to find how to pass the current code" - - - name: test e2e with migration - run: echo "TODO need to find how to pass the input" diff --git a/.github/workflows/e2e-site.yaml b/.github/workflows/e2e-site.yaml new file mode 100644 index 00000000..10321da8 --- /dev/null +++ b/.github/workflows/e2e-site.yaml @@ -0,0 +1,37 @@ +name: E2E on push event + +on: + push: + tags: + - v* + branches: + - main + - develop + - feat-add-e2e-test # TODO(user): remove it + workflow_dispatch: + +jobs: + e2e-current: + name: e2e current latest branch + runs-on: ubuntu-latest + + strategy: + matrix: + python-ver: ["3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-ver }} + + - name: install frappe from current commit + run: | + cd .. + python -m pip install --upgrade ./Frappe-Manager + + - name: frappe version + run: fm --version + + diff --git a/test/helpers.sh b/test/helpers.sh index a026f116..b0be67ce 100755 --- a/test/helpers.sh +++ b/test/helpers.sh @@ -1,18 +1,10 @@ #!/bin/bash Cleanup() { - python -m pip uninstall -y frappe_manager + python -m pip uninstall -y frappe-manager sudo rm -rf ~/frappe } - -# sudo apt update && sudo apt upgrade -y -# sudo add-apt-repository ppa:deadsnakes/ppa -# sudo apt update && sudo apt install python3.12 python3.12-venv -y -# python3.12 --version - -# python3.12 -m venv env - InstallFrappe() { local tagOrBranch=$1 if [ -d ~/Frappe-Manager ]; then