Skip to content

Commit

Permalink
ci: abstract e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
ismay committed Jun 10, 2024
1 parent 4428aec commit 748f856
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
19 changes: 1 addition & 18 deletions .github/workflows/dhis2-verify-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,7 @@ jobs:
uses: ./.github/workflows/test.yml

e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 20
- name: End-to-End tests
uses: cypress-io/github-action@v5
with:
start: npx --yes @dhis2/cli-cluster up 2.41 --channel dev --db-version 2.41 --seed, yarn start:nobrowser
wait-on: 'http://localhost:8080/dhis-web-commons/security/login.action, http://localhost:3000'
wait-on-timeout: 600
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_LOGIN_NAME: ${{ secrets.CYPRESS_LOGIN_NAME }}
CYPRESS_LOGIN_PASSWORD: ${{ secrets.CYPRESS_LOGIN_PASSWORD }}
CYPRESS_LOGIN_SERVER: http://localhost:8080
- run: npx --yes @dhis2/cli-cluster down 2.41
uses: ./.github/workflows/e2e.yml

release:
runs-on: ubuntu-latest
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on:
workflow_call:

jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
- uses: cypress-io/github-action@v5
with:
start: npx --yes @dhis2/cli-cluster up 2.41 --channel dev --db-version 2.41 --seed, yarn start:nobrowser
wait-on: 'http://localhost:8080/dhis-web-commons/security/login.action, http://localhost:3000'
wait-on-timeout: 600
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_LOGIN_NAME: ${{ secrets.CYPRESS_LOGIN_NAME }}
CYPRESS_LOGIN_PASSWORD: ${{ secrets.CYPRESS_LOGIN_PASSWORD }}
CYPRESS_LOGIN_SERVER: http://localhost:8080
- run: npx --yes @dhis2/cli-cluster down 2.41

0 comments on commit 748f856

Please sign in to comment.