Complexity level 3 -> Run Tests #74
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Complexity level 3 -> Run Tests | |
on: | |
schedule: | |
- cron: "0 8 * * *" # run on schedule, examples: https://crontab.guru/examples.html | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
browser: | |
type: choice | |
description: "Browser: chrome / firefox" | |
required: true | |
options: | |
- chrome | |
- firefox | |
default: "chrome" | |
jobs: | |
run-specs: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ">=16.0.0" | |
- name: Run Tests on DEV | |
if: ${{ github.event_name == 'schedule' && github.event_name != 'pull_request' }} | |
uses: cypress-io/github-action@v6 | |
with: | |
install: true | |
browser: ${{ inputs.browser }} | |
config-file: /${{ github.workspace }}/cypress/configs/cypress.dev.config.js | |
- name: Cypress screenshots | |
uses: actions/upload-artifact@v2 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: ${{ github.workspace }}/cypress/screenshots | |
- name: Cypress videos | |
uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: cypress-videos | |
path: ${{ github.workspace }}/cypress/videos |