Skip to content

Commit

Permalink
Merge ebc48e9 into 3a701c0
Browse files Browse the repository at this point in the history
  • Loading branch information
acsauk authored Dec 28, 2023
2 parents 3a701c0 + ebc48e9 commit 16146c8
Show file tree
Hide file tree
Showing 6 changed files with 415 additions and 33 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/dispatch_deploy_to_ur_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
run_against_image: true
tag: ur-${{ inputs.tag_to_deploy}}
checkout_tag: ${{ inputs.tag_to_deploy}}
matrixSpecs: '["cypress/e2e/donor/*","cypress/e2e/attorney/*,cypress/e2e/certificate-provider/*,cypress/e2e/accessibility/*,cypress/e2e/dev-features.cy.js,cypress/e2e/error-pages.cy.js"]'
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID_ACTIONS }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY_ACTIONS }}
Expand Down Expand Up @@ -73,7 +72,6 @@ jobs:
tag: ur-${{ inputs.tag_to_deploy}}
checkout_tag: ${{ inputs.tag_to_deploy}}
environment_config_json: ${{ needs.deploy.outputs.environment_config_json }}
matrixSpecs: '["cypress/e2e/donor/start.cy.js,cypress/e2e/smoke/external.cy.js"]'
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID_ACTIONS }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY_ACTIONS }}
Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/ui_test_job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ on:
description: 'Environment config JSON'
required: false
type: string
matrixSpecs:
description: 'A list of cypress specs in format ["<filepath,filepath>","<filepath>"] with each array value triggering an additional matrix job'
required: true
type: string
secrets:
aws_access_key_id:
description: 'AWS Access Key ID'
Expand All @@ -56,12 +52,6 @@ defaults:
jobs:
run_ui_tests:
runs-on: ubuntu-latest
strategy:
# don't fail the entire matrix on failure
fail-fast: false
matrix:
# run copies of the current job in parallel
specs: ${{ fromJSON(inputs.matrixSpecs) }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -114,14 +104,14 @@ jobs:
run: python ./scripts/ci_ingress/ci_ingress.py ${{ inputs.environment_config_json}} --add

- name: Cypress run
if: inputs.skip != true
uses: cypress-io/github-action@v6
with:
spec: ${{ matrix.specs }}
if: inputs.skip != true
env:
CYPRESS_baseUrl: ${{ inputs.base_url }}
CYPRESS_RECORD_KEY: ${{ secrets.cypress_record_key }}
GITHUB_TOKEN: ${{ secrets.github_access_token }}
with:
command: npm run cypress:parallel

- name: Persist Cypress failure screenshots as artifacts
if: failure()
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/workflow_path_to_live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ jobs:
base_url: "https://${{ needs.preproduction_deploy.outputs.url }}"
tag: ${{ needs.create_tags.outputs.version_tag }}
environment_config_json: ${{ needs.preproduction_deploy.outputs.environment_config_json }}
matrixSpecs: '["cypress/e2e/donor/start.cy.js,cypress/e2e/smoke/external.cy.js"]'
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID_ACTIONS }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY_ACTIONS }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/workflow_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ jobs:
run_against_image: true
tag: ${{ needs.create_tags.outputs.version_tag }}
skip: ${{ contains(fromJSON('["weblate-pr"]'), github.head_ref) }}
matrixSpecs: '["cypress/e2e/donor/*","cypress/e2e/attorney/*,cypress/e2e/certificate-provider/*,cypress/e2e/accessibility/*,cypress/e2e/dev-features.cy.js,cypress/e2e/error-pages.cy.js"]'
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID_ACTIONS }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY_ACTIONS }}
Expand Down Expand Up @@ -138,7 +137,6 @@ jobs:
base_url: "https://${{ needs.pr_deploy.outputs.url }}"
tag: ${{ needs.create_tags.outputs.version_tag }}
environment_config_json: ${{ needs.pr_deploy.outputs.environment_config_json }}
matrixSpecs: '["cypress/e2e/donor/start.cy.js,cypress/e2e/smoke/external.cy.js"]'
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID_ACTIONS }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY_ACTIONS }}
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"build:fonts": "mkdir -p web/static/assets/fonts && cp node_modules/govuk-frontend/govuk/assets/fonts/* web/static/assets/fonts",
"cypress:open": "node_modules/.bin/cypress open",
"cypress:run": "node_modules/.bin/cypress run -vvv",
"cypress:parallel" : "cypress-parallel -s cypress:run -t 2 -d cypress/e2e ",
"test": "jest"
},
"license": "MIT",
Expand All @@ -26,6 +27,7 @@
"cypress-axe": "^1.4",
"cypress-file-upload": "^5.0.8",
"cypress-multi-reporters": "^1.6.1",
"cypress-parallel": "^0.14.0",
"cypress-real-events": "^1.8.1"
}
}
Loading

0 comments on commit 16146c8

Please sign in to comment.