Add critical input in cypress workflow (#2043)

This commit is contained in:
Karolina Rakoczy 2022-05-13 12:01:49 +02:00 committed by GitHub
parent 66bfd1a32d
commit ad7e6458b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 0 deletions

View file

@ -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

View file

@ -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",