Skip to content

Commit

Permalink
set e2e test workflow bootup step
Browse files Browse the repository at this point in the history
  • Loading branch information
mahula committed May 5, 2024
1 parent 22b0808 commit 90ab878
Showing 1 changed file with 29 additions and 25 deletions.
54 changes: 29 additions & 25 deletions .github/workflows/e2e.run.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,34 @@ jobs:

- name: E2E | Boot up test system
run: |
cd frontend
cd authentik/
./database.unpack.sh
docker compose up
cd ../frontend
docker compose up frontend
sleep 10m
# - name: E2E | Run all tests
# id: e2e-run
# uses: cypress-io/github-action@v6
# with:
# working-directory: cypress

# - name: E2E | if tests failed, compile html report
# if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
# run: |
# cd cypress/
# npx tsx create-cucumber-html-report.ts
# working-directory: cypress

# - name: Get PR number
# if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
# uses: jwalton/gh-find-current-pr@master
# id: pr-number

# - name: E2E | if tests failed, upload report
# if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
# uses: actions/upload-artifact@v4
# with:
# name: boilerplate-e2e-test-report-pr-${{ steps.pr-number.outputs.pr }}
# path: /home/runner/work/boilerplate-e2e-cypress-cucumber/boilerplate-e2e-cypress-cucumber/cypress/reports/e2e_html_report
- name: E2E | Run all tests
id: e2e-run
uses: cypress-io/github-action@v6
with:
working-directory: cypress

- name: E2E | if tests failed, compile html report
if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
run: |
cd cypress/
npx tsx create-cucumber-html-report.ts
working-directory: cypress

- name: Get PR number
if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
uses: jwalton/gh-find-current-pr@master
id: pr-number

- name: E2E | if tests failed, upload report
if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: boilerplate-e2e-test-report-pr-${{ steps.pr-number.outputs.pr }}
path: /home/runner/work/boilerplate-e2e-cypress-cucumber/boilerplate-e2e-cypress-cucumber/cypress/reports/e2e_html_report

0 comments on commit 90ab878

Please sign in to comment.