Run All Tests Headless #55
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
# https://github.com/marketplace/actions/cypress-io | |
name: Run All Tests Headless | |
on: | |
workflow_dispatch: | |
inputs: | |
ru: | |
description: The variable to be passed | |
required: false | |
default: TEST | |
schedule: | |
- cron: 0 7 * * 1 | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
containers: [1, 2] # Uses 2 parallel instances | |
steps: | |
# Include reusable steps from above | |
- name: 'Run reusable steps' | |
uses: ./.github/workflows/setup.yml | |
- name: Run Tests | |
uses: cypress-io/github-action@v6 | |
with: | |
browser: chrome | |
spec: 'cypress/e2e/**/*' # Run all tests. Same as empty string '' | |
env: | |
CYPRESS_RU: ${{ github.event.inputs.ru }} | |
SPLIT: ${{ strategy.job-total }} | |
SPLIT_INDEX: ${{ strategy.job-index }} | |
# CYPRESS_BASE_URL: '' # Fil in new baseUrl with https prefix | |
- name: Prepare report | |
if: success() || failure() | |
run: | | |
mkdir -p cypress/results/ | |
cp -r cypress/reports/html/* cypress/results/ | |
- name: Archive results | |
if: success() || failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: artifacts | |
path: | | |
cypress/results/** | |