Fix cypress tests workflow (#3546)
* Fix cypress test workflow * use latest version of cypress action * Update .github/workflows/tests-nightly.yml Co-authored-by: Mikail <6186720+NyanKiyoshi@users.noreply.github.com> --------- Co-authored-by: Mikail <6186720+NyanKiyoshi@users.noreply.github.com>
This commit is contained in:
parent
3487dce57f
commit
08a5ea93ab
2 changed files with 26 additions and 9 deletions
6
.github/workflows/percy-demo-tests.yml
vendored
6
.github/workflows/percy-demo-tests.yml
vendored
|
@ -31,7 +31,7 @@ jobs:
|
|||
cypress-run-tests:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TEST_KIND: ${{ github.event.inputs.testsKind || github.event.client_payload.testsKind }}
|
||||
TEST_KIND: ${{ github.event.inputs.testsKind || github.event.client_payload.testsKind || "all"}}
|
||||
container: cypress/browsers:node18.12.0-chrome106-ff106
|
||||
|
||||
steps:
|
||||
|
@ -66,7 +66,7 @@ jobs:
|
|||
- name: Cypress run test percy
|
||||
if: contains(fromJSON('["percy", "all"]'), env.TEST_KIND)
|
||||
continue-on-error: true
|
||||
uses: cypress-io/github-action@v4
|
||||
uses: cypress-io/github-action@v5
|
||||
env:
|
||||
API_URI: ${{ steps.get-env-urls.outputs.API_URL }}
|
||||
APP_MOUNT_URI: ${{ secrets.APP_MOUNT_URI }}
|
||||
|
@ -84,7 +84,7 @@ jobs:
|
|||
- name: Cypress run test functional
|
||||
if: contains(fromJSON('["functional", "all"]'), env.TEST_KIND)
|
||||
continue-on-error: true
|
||||
uses: cypress-io/github-action@v4
|
||||
uses: cypress-io/github-action@v5
|
||||
env:
|
||||
API_URI: ${{ steps.get-env-urls.outputs.API_URL }}
|
||||
APP_MOUNT_URI: ${{ secrets.APP_MOUNT_URI }}
|
||||
|
|
27
.github/workflows/tests-nightly.yml
vendored
27
.github/workflows/tests-nightly.yml
vendored
|
@ -95,6 +95,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
env:
|
||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||
GREP_TAGS: ${{ github.event.inputs.tags || "@allEnv"}}
|
||||
outputs:
|
||||
status: ${{ steps.cypress.outcome }}
|
||||
container: cypress/browsers:node18.12.0-chrome106-ff106
|
||||
|
@ -125,11 +126,18 @@ jobs:
|
|||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Cypress install
|
||||
id: cypress-install
|
||||
if: ${{ github.event.inputs.tests != 'Critical' && github.event_name != 'repository_dispatch'}}
|
||||
uses: cypress-io/github-action@v5
|
||||
with:
|
||||
runTests: false
|
||||
|
||||
- name: Cypress run
|
||||
id: cypress
|
||||
continue-on-error: true
|
||||
if: ${{ github.event.inputs.tests != 'Critical' && github.event_name != 'repository_dispatch'}}
|
||||
uses: cypress-io/github-action@v4
|
||||
uses: cypress-io/github-action@v5
|
||||
env:
|
||||
API_URI: ${{ steps.get-env-uri.outputs.ENV_URI }}graphql/
|
||||
APP_MOUNT_URI: ${{ secrets.APP_MOUNT_URI }}
|
||||
|
@ -142,14 +150,15 @@ jobs:
|
|||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CYPRESS_mailHogUrl: ${{ secrets.CYPRESS_MAILHOG }}
|
||||
COMMIT_INFO_MESSAGE: All tests triggered via ${{ github.event_name}} on ${{ steps.get-env-uri.outputs.ENV_URI }}
|
||||
CYPRESS_grepTags: ${{ github.event.inputs.tags }}
|
||||
CYPRESS_grepTags: ${{ env.GREP_TAGS }}
|
||||
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
|
||||
STRIPE_PUBLIC_KEY: ${{ secrets.STRIPE_PUBLIC_KEY }}
|
||||
with:
|
||||
install: false
|
||||
parallel: true
|
||||
group: 'UI - Chrome'
|
||||
record: true
|
||||
tag: ${{ steps.get-env-uri.outputs.ENV_URI }},${{ github.event.inputs.tags }}
|
||||
tag: ${{ steps.get-env-uri.outputs.ENV_URI }},${{ env.GREP_TAGS }}
|
||||
|
||||
get-environment-variables:
|
||||
if: ${{ github.event_name == 'repository_dispatch' && (github.event.client_payload.environment == 'SANDBOX' || github.event.client_payload.environment == 'STAGING')}}
|
||||
|
@ -223,10 +232,17 @@ jobs:
|
|||
return "@stable"
|
||||
}
|
||||
|
||||
- name: Cypress install
|
||||
id: cypress-install
|
||||
continue-on-error: true
|
||||
uses: cypress-io/github-action@v5
|
||||
with:
|
||||
runTests: false
|
||||
|
||||
- name: Cypress run - automatically
|
||||
id: cypress
|
||||
continue-on-error: true
|
||||
uses: cypress-io/github-action@v4
|
||||
uses: cypress-io/github-action@v5
|
||||
env:
|
||||
API_URI: ${{ needs.get-environment-variables.outputs.url }}graphql/
|
||||
APP_MOUNT_URI: ${{ secrets.APP_MOUNT_URI }}
|
||||
|
@ -243,6 +259,7 @@ jobs:
|
|||
COMMIT_INFO_MESSAGE: Triggered via release - ${{github.event.client_payload.project}} ${{github.event.client_payload.version}}, ${{github.event.client_payload.pullRequestUrl}}
|
||||
CYPRESS_grepTags: ${{steps.set-tag-for-tests.outputs.result}}
|
||||
with:
|
||||
install: false
|
||||
parallel: true
|
||||
group: 'UI - Chrome'
|
||||
record: true
|
||||
|
@ -298,4 +315,4 @@ jobs:
|
|||
JOB_TITLE: "Test release workflow - ${{github.event.client_payload.project}} ${{github.event.client_payload.version}}"
|
||||
JOB_KIND: "release tests"
|
||||
run: |
|
||||
python3 ./.github/workflows/notify/notify-slack.py
|
||||
python3 .github/workflows/notify/notify-slack.py
|
Loading…
Reference in a new issue