Skip to content

Commit

Permalink
chore: custom dev instance for nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferarnesen committed Apr 2, 2024
1 parent 36445b4 commit 30d3591
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 1 deletion.
70 changes: 70 additions & 0 deletions .github/workflows/e2e-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: 'e2e-dev'

on:
workflow_call:
secrets:
username:
required: true
password:
required: true
recordkey:
required: true

concurrency:
group: e2e-dev-${{ github.workflow}}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
compute-dev-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.instance-version.outputs.version }}
steps:
- name: Output dev version
id: instance-version
uses: dhis2/action-instance-version@v1
with:
instance-url: https://test.e2e.dhis2.org/analytics-2.41d
username: ${{ secrets.username }}
password: ${{ secrets.password }}

e2e-dev:
needs: compute-dev-version
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
containers: [1, 2, 3, 4]

steps:
- name: Checkout
uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Run e2e tests
uses: cypress-io/github-action@v5
with:
start: yarn d2-app-scripts start
wait-on: 'http://localhost:3000'
wait-on-timeout: 300
record: true
parallel: true
browser: chrome
group: e2e-chrome-parallel-dev
env:
BROWSER: none
CYPRESS_RECORD_KEY: ${{ secrets.recordkey }}
CYPRESS_dhis2BaseUrl: https://test.e2e.dhis2.org/analytics-2.41d
CYPRESS_dhis2InstanceVersion: ${{ needs.compute-dev-version.outputs.version }}
CYPRESS_dhis2Username: ${{ secrets.username }}
CYPRESS_dhis2Password: ${{ secrets.password }}
CYPRESS_networkMode: live
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ defaults:

jobs:
call-workflow-e2e-dev:
uses: dhis2/workflows/.github/workflows/analytics-e2e-tests-dev.yml@master
# uses: dhis2/workflows/.github/workflows/analytics-e2e-tests-dev.yml@master
uses: ./.github/workflows/e2e-dev.yml
secrets:
username: ${{ secrets.CYPRESS_DHIS2_USERNAME }}
password: ${{ secrets.CYPRESS_DHIS2_PASSWORD }}
Expand Down

0 comments on commit 30d3591

Please sign in to comment.