SBVT-2842: Adding axe to all the screenshots #288
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: cypress-version-check | |
#on: [push] | |
on: [pull_request] | |
jobs: | |
cypress-run: | |
runs-on: self-hosted | |
strategy: | |
fail-fast: false | |
matrix: | |
cypress-version: [9.7.0, 10.11.0, 11.2.0, 12.13.0, 13.1.0, latest, dev] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Extract Branch Name and Set Test Run Name | |
id: set-test-run-name | |
run: | | |
BRANCH_NAME=$(echo "${{ github.ref }}" | awk -F'/' '{print $3}') | |
echo "::set-output name=TEST_RUN_NAME::${{ github.workflow }}:${{ matrix.cypress-version }}—$BRANCH_NAME" | |
- name: Install root dependencies | |
run: npm install | |
- name: Clear Cypress cache | |
run: | | |
sudo rm -rf $HOME/.cache/Cypress | |
# ************ | |
# VERSION 10 and ABOVE | |
# ************ | |
- name: Install test dependencies | |
if: ${{ startsWith(matrix.cypress-version, '10') || startsWith(matrix.cypress-version, '11') || startsWith(matrix.cypress-version, '12') || startsWith(matrix.cypress-version, 'dev') || startsWith(matrix.cypress-version, 'latest') }} | |
working-directory: ./test/version-control-test/above10 | |
run: npm install | |
- name: "Install Cypress Version: ${{ matrix.cypress-version }}" | |
if: ${{ startsWith(matrix.cypress-version, '10') || startsWith(matrix.cypress-version, '11') || startsWith(matrix.cypress-version, '12') || startsWith(matrix.cypress-version, 'dev') || startsWith(matrix.cypress-version, 'latest') }} | |
working-directory: ./test/version-control-test/above10 | |
run: npm install cypress@${{ matrix.cypress-version }} | |
- name: Setup visualtest | |
if: ${{ startsWith(matrix.cypress-version, '10') || startsWith(matrix.cypress-version, '11') || startsWith(matrix.cypress-version, '12') || startsWith(matrix.cypress-version, 'dev') || startsWith(matrix.cypress-version, 'latest') }} | |
working-directory: ./test/version-control-test/above10 | |
run: npx visualtest-setup > visualtest-first-logs.txt | |
- name: Setup visualtest for second time | |
if: ${{ startsWith(matrix.cypress-version, '10') || startsWith(matrix.cypress-version, '11') || startsWith(matrix.cypress-version, '12') || startsWith(matrix.cypress-version, 'dev') || startsWith(matrix.cypress-version, 'latest') }} | |
working-directory: ./test/version-control-test/above10 | |
run: npx visualtest-setup > visualtest-second-logs.txt | |
- name: Verify npx visualtest-setup | |
if: ${{ startsWith(matrix.cypress-version, '10') || startsWith(matrix.cypress-version, '11') || startsWith(matrix.cypress-version, '12') || startsWith(matrix.cypress-version, 'dev') || startsWith(matrix.cypress-version, 'latest') }} | |
working-directory: ./test/version-control-test/above10 | |
run: npx jest | |
- name: Cypress run | |
if: ${{ startsWith(matrix.cypress-version, '10') || startsWith(matrix.cypress-version, '11') || startsWith(matrix.cypress-version, '12') || startsWith(matrix.cypress-version, 'dev') || startsWith(matrix.cypress-version, 'latest') }} | |
uses: cypress-io/github-action@v5 | |
with: | |
quiet: true | |
working-directory: ./test/version-control-test/above10 | |
spec: cypress/e2e/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PROJECT_TOKEN: ${{ secrets.DEV_EXAMPLE_7 }} | |
TEST_RUN_NAME: ${{ steps.set-test-run-name.outputs.TEST_RUN_NAME }} | |
SBVT_SCM_BRANCH: ${{ github.head_ref || github.ref_name }} | |
SBVT_SCM_COMMIT_ID: ${{ github.sha }} | |
DEBUG: TRUE | |
# ************ | |
# CYPRESS VERSIONS 7-9 | |
# ************ | |
- name: Install test dependencies | |
if: ${{ startsWith(matrix.cypress-version, '7') || startsWith(matrix.cypress-version, '8') || startsWith(matrix.cypress-version, '9') }} | |
working-directory: ./test/version-control-test/below10 | |
run: npm install | |
- name: "Install Cypress Version: ${{ matrix.cypress-version }}" | |
if: ${{ startsWith(matrix.cypress-version, '7') || startsWith(matrix.cypress-version, '8') || startsWith(matrix.cypress-version, '9') }} | |
working-directory: ./test/version-control-test/below10 | |
run: npm install cypress@${{ matrix.cypress-version }} | |
- name: Setup visualtest | |
if: ${{ startsWith(matrix.cypress-version, '7') || startsWith(matrix.cypress-version, '8') || startsWith(matrix.cypress-version, '9') }} | |
working-directory: ./test/version-control-test/below10 | |
run: npx visualtest-setup > visualtest-first-logs.txt | |
- name: Setup visualtest for second time | |
if: ${{ startsWith(matrix.cypress-version, '7') || startsWith(matrix.cypress-version, '8') || startsWith(matrix.cypress-version, '9') }} | |
working-directory: ./test/version-control-test/below10 | |
run: npx visualtest-setup > visualtest-second-logs.txt | |
- name: Verify npx visualtest-setup | |
if: ${{ startsWith(matrix.cypress-version, '7') || startsWith(matrix.cypress-version, '8') || startsWith(matrix.cypress-version, '9') }} | |
working-directory: ./test/version-control-test/below10 | |
run: npx jest | |
- name: Cypress run | |
if: ${{ startsWith(matrix.cypress-version, '7') || startsWith(matrix.cypress-version, '8') || startsWith(matrix.cypress-version, '9') }} | |
uses: cypress-io/github-action@v5 | |
with: | |
quiet: true | |
working-directory: ./test/version-control-test/below10 | |
spec: cypress/integration/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PROJECT_TOKEN: ${{ secrets.DEV_EXAMPLE_7 }} | |
TEST_RUN_NAME: ${{ steps.set-test-run-name.outputs.TEST_RUN_NAME }} | |
SBVT_SCM_BRANCH: ${{ github.head_ref || github.ref_name }} | |
SBVT_SCM_COMMIT_ID: ${{ github.sha }} | |
DEBUG: TRUE |