Cypress Tests #154
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
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Cypress Tests | |
on: | |
schedule: | |
- cron: '30 11,17 * * *' | |
jobs: | |
cypress-run: | |
runs-on: ubuntu-latest | |
# Runs tests in parallel with matrix strategy https://docs.cypress.io/guides/guides/parallelization | |
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs | |
# Also see warning here https://github.com/cypress-io/github-action#parallel | |
strategy: | |
fail-fast: false # https://github.com/cypress-io/github-action/issues/48 | |
matrix: | |
containers: [1, 2] # Uses 2 parallel instances | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
run: npm install -g pnpm@8 | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: Setup pnpm cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('examples/basic-pnpm/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
uses: cypress-io/github-action@v6 | |
with: | |
working-directory: ./ | |
runTests: false | |
- name: Cypress run | |
# Uses the official Cypress GitHub action https://github.com/cypress-io/github-action | |
uses: cypress-io/github-action@v6 | |
with: | |
working-directory: ./packages/vtron-e2e | |
browser: chrome | |
install: false | |
# Starts web server for E2E tests - replace with your own server invocation | |
# https://docs.cypress.io/guides/continuous-integration/introduction#Boot-your-server | |
# start: npm start | |
# wait-on: 'http://localhost:3000' # Waits for above | |
# Records to Cypress Cloud | |
# https://docs.cypress.io/guides/cloud/projects#Set-up-a-project-to-record | |
record: true | |
parallel: true # Runs test in parallel using settings above | |
env: | |
# For recording and parallelization to work you must set your CYPRESS_RECORD_KEY | |
# in GitHub repo → Settings → Secrets → Actions | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
# Creating a token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |