test out on its own branch #2
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@v2 | |
with: | |
# ref: ${{ github.event.inputs.branch }} | |
ref: master | |
- name: Run Cypress Tests | |
uses: cypress-io/github-action@v4 | |
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/** | |
env: | |
# override the baseUrl | |
# CYPRESS_baseUrl: ${{ github.event.inputs.deployedUrl }} | |
CYPRESS_baseUrl: https://collaborative-learning.concord.org/index-staging.html | |
# 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 |