Add critical input in cypress workflow (#2043)
This commit is contained in:
parent
66bfd1a32d
commit
ad7e6458b5
2 changed files with 28 additions and 0 deletions
27
.github/workflows/tests-nightly.yml
vendored
27
.github/workflows/tests-nightly.yml
vendored
|
@ -3,6 +3,14 @@ name: Execute nightly tests
|
|||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tests:
|
||||
required: true
|
||||
description: 'Select tests to run'
|
||||
default: 'All'
|
||||
type: choice
|
||||
options:
|
||||
- 'All'
|
||||
- 'Critical'
|
||||
environment:
|
||||
required: true
|
||||
description: 'Environment to run tests against'
|
||||
|
@ -96,6 +104,7 @@ jobs:
|
|||
node-version: 14
|
||||
|
||||
- name: Cypress run
|
||||
if: ${{ github.event.inputs.tests == 'All' }}
|
||||
uses: cypress-io/github-action@v2
|
||||
env:
|
||||
API_URI: ${{ steps.get-env-uri.outputs.ENV_URI }}graphql/
|
||||
|
@ -112,5 +121,23 @@ jobs:
|
|||
group: 'UI - Chrome'
|
||||
command: npm run cy:run:allEnv:parallel
|
||||
|
||||
- name: Cypress run
|
||||
if: ${{ github.event.inputs.tests == 'Critical' }}
|
||||
uses: cypress-io/github-action@v2
|
||||
env:
|
||||
API_URI: ${{ steps.get-env-uri.outputs.ENV_URI }}graphql/
|
||||
APP_MOUNT_URI: ${{ secrets.APP_MOUNT_URI }}
|
||||
CYPRESS_baseUrl: ${{ steps.get-env-uri.outputs.ENV_URI }}dashboard/
|
||||
CYPRESS_USER_NAME: ${{ secrets.CYPRESS_USER_NAME }}
|
||||
CYPRESS_SECOND_USER_NAME: ${{ secrets.CYPRESS_SECOND_USER_NAME }}
|
||||
CYPRESS_USER_PASSWORD: ${{ secrets.CYPRESS_USER_PASSWORD }}
|
||||
CYPRESS_PERMISSIONS_USERS_PASSWORD: ${{ secrets.CYPRESS_PERMISSIONS_USERS_PASSWORD }}
|
||||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
parallel: true
|
||||
group: 'UI - Chrome'
|
||||
command: npm run cy:run:critical:parallel
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -273,6 +273,7 @@
|
|||
"cy:run:refactored:locally": "cypress run --env tags=refactored --spec 'cypress/integration/navigation.js','cypress/integration/products/createProduct.js', 'cypress/integration/products/productsVariants.js', --reporter cypress-mochawesome-reporter --reporter-options reportDir='cypress/reports',overwrite=true,charts=true",
|
||||
"cy:run:critical": "cypress run --record --env tags=critical --spec 'cypress/integration/navigation.js','cypress/integration/products/createProduct.js', 'cypress/integration/products/productsVariants.js'",
|
||||
"cy:run:allEnv": "cypress run --record --env tags=all",
|
||||
"cy:run:critical:parallel": "cypress run --record --env tags=critical --spec 'cypress/integration/navigation.js','cypress/integration/products/createProduct.js', 'cypress/integration/products/productsVariants.js' --parallel",
|
||||
"cy:run:allEnv:parallel": "cypress run --record --env tags=all --parallel",
|
||||
"test:e2e:run": "start-server-and-test start http://localhost:9000 cy:run",
|
||||
"test:e2e:run:record": "start-server-and-test start http://localhost:9000 cy:run:record",
|
||||
|
|
Loading…
Reference in a new issue