.. #122
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 Tests | |
on: | |
push: | |
jobs: | |
cypress-tests: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
# run 3 copies of the current job in parallel | |
containers: [1, 2, 3] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# populate commit message for merge commits | |
# see https://currents.dev/readme/ci-setup/github-actions | |
# with: | |
# ref: ${{ github.event.pull_request.head.sha }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
# Install Currents | |
- name: Install dependencies | |
run: | | |
yarn install --frozen-lockfile | |
- name: Unblock Cypress | |
# working-directory: "services/rails" | |
run: | | |
CYPRESS_DOWNLOAD_MIRROR=https://cy-cdn.currents.dev npx cypress install --force | |
echo 👀 Cypress Cache | |
yarn cypress cache list | |
yarn cypress cache path | |
echo 👀 Cypress SHA | |
file `yarn cypress cache path`/12.17.4/Cypress/Cypress | |
echo 👀 Yarn global dependencies | |
yarn global list | grep cypress | |
echo 👀 Yarn local dependencies | |
yarn list | grep cypress | |
# Run all Cypress tests | |
- name: Run Cypress on Currents.dev | |
uses: cypress-io/github-action@v6 | |
continue-on-error: true | |
with: | |
command: | | |
yarn cypress-cloud --record --parallel --browser chrome --key ${{ secrets.CURRENTS_RECORD_KEY }} --ci-build-id "${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt}}" | |
- name: Cancel the run if workflow is cancelled | |
if: ${{ cancelled() }} | |
uses: currents-dev/cancel-run-gh-action@v1 | |
with: | |
api-token: ${{ secrets.CURRENTS_API_KEY }} | |
github-run-id: ${{ github.run_id }} | |
github-run-attempt: ${{ github.run_attempt }} |