From 30d3591cbc33f8b15ee87a4aa47846392561a9a4 Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Tue, 2 Apr 2024 13:15:51 +0200 Subject: [PATCH] chore: custom dev instance for nightly --- .github/workflows/e2e-dev.yml | 70 +++++++++++++++++++++++++++++++++++ .github/workflows/nightly.yml | 3 +- 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/e2e-dev.yml diff --git a/.github/workflows/e2e-dev.yml b/.github/workflows/e2e-dev.yml new file mode 100644 index 000000000..832a328bf --- /dev/null +++ b/.github/workflows/e2e-dev.yml @@ -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 }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index ea05ceeff..1d9f47cab 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -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 }}