exemplar isn't always the first doc #13
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: Deployed Regression | |
on: | |
# workflow_dispatch: | |
# inputs: | |
# branch: | |
# description: Branch containing cypress tests | |
# default: master | |
# required: true | |
# deployedUrl: | |
# description: URL to test | |
# default: https://collaborative-learning.concord.org/index-staging.html | |
# required: true | |
push: | |
jobs: | |
all-tests: | |
runs-on: ubuntu-latest | |
container: cypress/browsers:node-20.11.0-chrome-121.0.6167.184-1-ff-123.0-edge-121.0.2277.128-1 | |
strategy: | |
# when one test fails, DO NOT cancel the other | |
# containers, because this will kill Cypress processes | |
# leaving the Dashboard hanging ... | |
# https://github.com/cypress-io/github-action/issues/48 | |
fail-fast: false | |
matrix: | |
# run 5 copies of the current job in parallel | |
containers: [1, 2, 3, 4, 5, 6, 7] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
# ref: ${{ github.event.inputs.branch }} | |
ref: 187652818-cypress-on-staging | |
- name: Run Cypress Tests | |
uses: cypress-io/github-action@v6 | |
with: | |
# TODO: we might need to manual set the build id | |
# TODO: the description of the run in cypress will be the commit message of branch | |
# instead of something about the app being tested. | |
# only record the results to dashboard.cypress.io if CYPRESS_RECORD_KEY is set | |
record: ${{ !!secrets.CYPRESS_RECORD_KEY }} | |
# only do parallel if we have a record key | |
parallel: ${{ !!secrets.CYPRESS_RECORD_KEY }} | |
browser: chrome | |
spec: cypress/e2e/functional/** | |
# explicit wait-on to try to get around the configuration issue | |
# wait-on: https://collaborative-learning.concord.org/index-staging.html | |
# config: baseUrl=${{ github.event.inputs.deployedUrl }} | |
# We can't use index-staging.html for several reasons: | |
# - visiting the doc-editor won't work with that baseUrl | |
# - loading the qa units won't work without additional changes because | |
# they would be relative to the root instead of the version folder | |
config: baseUrl=https://collaborative-learning.concord.org/version/v5.10.1/ | |
env: | |
# pass the Dashboard record key as an environment variable | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
# pass GitHub token to allow accurately detecting a build vs a re-run build | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Increase memory allocation | |
NODE_OPTIONS: "--max_old_space_size=4096" | |
# Note: we can't do code coverage because the deployed code will not be | |
# instrumented |