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:
|
cypress-run-tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
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
|
container: cypress/browsers:node18.12.0-chrome106-ff106
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -66,7 +66,7 @@ jobs:
|
||||||
- name: Cypress run test percy
|
- name: Cypress run test percy
|
||||||
if: contains(fromJSON('["percy", "all"]'), env.TEST_KIND)
|
if: contains(fromJSON('["percy", "all"]'), env.TEST_KIND)
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
uses: cypress-io/github-action@v4
|
uses: cypress-io/github-action@v5
|
||||||
env:
|
env:
|
||||||
API_URI: ${{ steps.get-env-urls.outputs.API_URL }}
|
API_URI: ${{ steps.get-env-urls.outputs.API_URL }}
|
||||||
APP_MOUNT_URI: ${{ secrets.APP_MOUNT_URI }}
|
APP_MOUNT_URI: ${{ secrets.APP_MOUNT_URI }}
|
||||||
|
@ -84,7 +84,7 @@ jobs:
|
||||||
- name: Cypress run test functional
|
- name: Cypress run test functional
|
||||||
if: contains(fromJSON('["functional", "all"]'), env.TEST_KIND)
|
if: contains(fromJSON('["functional", "all"]'), env.TEST_KIND)
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
uses: cypress-io/github-action@v4
|
uses: cypress-io/github-action@v5
|
||||||
env:
|
env:
|
||||||
API_URI: ${{ steps.get-env-urls.outputs.API_URL }}
|
API_URI: ${{ steps.get-env-urls.outputs.API_URL }}
|
||||||
APP_MOUNT_URI: ${{ secrets.APP_MOUNT_URI }}
|
APP_MOUNT_URI: ${{ secrets.APP_MOUNT_URI }}
|
||||||
|
|
29
.github/workflows/tests-nightly.yml
vendored
29
.github/workflows/tests-nightly.yml
vendored
|
@ -95,6 +95,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||||
|
GREP_TAGS: ${{ github.event.inputs.tags || "@allEnv"}}
|
||||||
outputs:
|
outputs:
|
||||||
status: ${{ steps.cypress.outcome }}
|
status: ${{ steps.cypress.outcome }}
|
||||||
container: cypress/browsers:node18.12.0-chrome106-ff106
|
container: cypress/browsers:node18.12.0-chrome106-ff106
|
||||||
|
@ -125,11 +126,18 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
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
|
- name: Cypress run
|
||||||
id: cypress
|
id: cypress
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
if: ${{ github.event.inputs.tests != 'Critical' && github.event_name != 'repository_dispatch'}}
|
if: ${{ github.event.inputs.tests != 'Critical' && github.event_name != 'repository_dispatch'}}
|
||||||
uses: cypress-io/github-action@v4
|
uses: cypress-io/github-action@v5
|
||||||
env:
|
env:
|
||||||
API_URI: ${{ steps.get-env-uri.outputs.ENV_URI }}graphql/
|
API_URI: ${{ steps.get-env-uri.outputs.ENV_URI }}graphql/
|
||||||
APP_MOUNT_URI: ${{ secrets.APP_MOUNT_URI }}
|
APP_MOUNT_URI: ${{ secrets.APP_MOUNT_URI }}
|
||||||
|
@ -142,14 +150,15 @@ jobs:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
CYPRESS_mailHogUrl: ${{ secrets.CYPRESS_MAILHOG }}
|
CYPRESS_mailHogUrl: ${{ secrets.CYPRESS_MAILHOG }}
|
||||||
COMMIT_INFO_MESSAGE: All tests triggered via ${{ github.event_name}} on ${{ steps.get-env-uri.outputs.ENV_URI }}
|
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_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
|
||||||
STRIPE_PUBLIC_KEY: ${{ secrets.STRIPE_PUBLIC_KEY }}
|
STRIPE_PUBLIC_KEY: ${{ secrets.STRIPE_PUBLIC_KEY }}
|
||||||
with:
|
with:
|
||||||
|
install: false
|
||||||
parallel: true
|
parallel: true
|
||||||
group: 'UI - Chrome'
|
group: 'UI - Chrome'
|
||||||
record: true
|
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:
|
get-environment-variables:
|
||||||
if: ${{ github.event_name == 'repository_dispatch' && (github.event.client_payload.environment == 'SANDBOX' || github.event.client_payload.environment == 'STAGING')}}
|
if: ${{ github.event_name == 'repository_dispatch' && (github.event.client_payload.environment == 'SANDBOX' || github.event.client_payload.environment == 'STAGING')}}
|
||||||
|
@ -222,11 +231,18 @@ jobs:
|
||||||
}else{
|
}else{
|
||||||
return "@stable"
|
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
|
- name: Cypress run - automatically
|
||||||
id: cypress
|
id: cypress
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
uses: cypress-io/github-action@v4
|
uses: cypress-io/github-action@v5
|
||||||
env:
|
env:
|
||||||
API_URI: ${{ needs.get-environment-variables.outputs.url }}graphql/
|
API_URI: ${{ needs.get-environment-variables.outputs.url }}graphql/
|
||||||
APP_MOUNT_URI: ${{ secrets.APP_MOUNT_URI }}
|
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}}
|
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}}
|
CYPRESS_grepTags: ${{steps.set-tag-for-tests.outputs.result}}
|
||||||
with:
|
with:
|
||||||
|
install: false
|
||||||
parallel: true
|
parallel: true
|
||||||
group: 'UI - Chrome'
|
group: 'UI - Chrome'
|
||||||
record: true
|
record: true
|
||||||
|
@ -298,4 +315,4 @@ jobs:
|
||||||
JOB_TITLE: "Test release workflow - ${{github.event.client_payload.project}} ${{github.event.client_payload.version}}"
|
JOB_TITLE: "Test release workflow - ${{github.event.client_payload.project}} ${{github.event.client_payload.version}}"
|
||||||
JOB_KIND: "release tests"
|
JOB_KIND: "release tests"
|
||||||
run: |
|
run: |
|
||||||
python3 ./.github/workflows/notify/notify-slack.py
|
python3 .github/workflows/notify/notify-slack.py
|
Loading…
Reference in a new issue