Manual Regression #39
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: Manual Regression | |
on: | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: Branch (on which to run the tests) | |
default: master | |
required: true | |
browser: | |
description: Browser (can be chrome or firefox) | |
default: chrome | |
required: true | |
test: | |
type: choice | |
description: Tests to run | |
default: all | |
options: | |
- all | |
- cleanup/remove_teacher_comment_spec.js | |
- functional/author_tests/doc-editor_spec.js | |
- functional/document_tests/canvas_test_spec.js | |
- functional/document_tests/group_chooser_spec.js | |
- functional/document_tests/group_test_readonly_spec.js | |
- functional/document_tests/group_test_spec.js | |
- functional/document_tests/header_test_spec.js | |
- functional/document_tests/nav_panel_test_spec.js | |
- functional/document_tests/student_test_spec.js | |
- functional/document_tests/workspace_test_spec.js | |
- functional/portal_user_tests/teacher_chat_spec.js | |
- functional/teacher_tests/history_playback_spec.js | |
- functional/teacher_tests/teacher_chat_spec.js | |
- functional/teacher_tests/teacher_curation_spec.js | |
- functional/teacher_tests/teacher_dashboard_4_quadrants_spec.js | |
- functional/teacher_tests/teacher_dashboard_spec.js | |
- functional/teacher_tests/teacher_network_spec.js | |
- functional/teacher_tests/teacher_six_pack_spec.js | |
- functional/teacher_tests/teacher_starreddocument_scroller_spec.js | |
- functional/teacher_tests/teacher_support_spec.js | |
- functional/teacher_tests/teacher_tagged_comments_spec.js | |
- functional/teacher_tests/teacher_workspace_spec.js | |
- functional/tile_tests/arrow_annotation_spec.js | |
- functional/tile_tests/data_card_tool_spec.js | |
- functional/tile_tests/datacard_merge_spec.js | |
- functional/tile_tests/dataflow_table_integration_test_spec.js | |
- functional/tile_tests/dataflow_tool_spec.js | |
- functional/tile_tests/diagram_tool_spec.js | |
- functional/tile_tests/drawing_tool_spec.js | |
- functional/tile_tests/duplicate_tile_spec.js | |
- functional/tile_tests/expression_tool_spec.js | |
- functional/tile_tests/graph_table_integraton_test_spec.js | |
- functional/tile_tests/graph_tool_spec.js | |
- functional/tile_tests/image_tool_spec.js | |
- functional/tile_tests/numberline_tool_spec.js | |
- functional/tile_tests/shared_dataset_spec.js | |
- functional/tile_tests/shared_variables_test_spec.js | |
- functional/tile_tests/simulator_tile_spec.js | |
- functional/tile_tests/table_tool_spec.js | |
- functional/tile_tests/text_tool_spec.js | |
- functional/tile_tests/xy_plot_tool_spec.js | |
- smoke/single_student_canvas_test.js | |
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 | |
if: ${{ github.event.inputs.test == 'all' }} | |
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 }} | |
- name: Install CMS Dependencies | |
working-directory: ./cms | |
run: npm ci | |
- name: Set the browser | |
env: | |
DEFAULT_BROWSER: chrome | |
run: | | |
echo "BROWSER=${{ github.event.inputs.browser || env.DEFAULT_BROWSER }}" >> $GITHUB_ENV | |
echo "Tests to run: ${{ github.event.inputs.test }}" | |
- uses: cypress-io/github-action@v4 | |
with: | |
start: npm start | |
wait-on: 'http://localhost:8080' | |
# wait 10 minutes to start the addition of the CMS required this increase | |
wait-on-timeout: 600 | |
# 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: ${{ env.BROWSER }} | |
spec: cypress/e2e/functional/** | |
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 }} | |
# turn on code coverage when running npm start | |
# so far we've been using a webpack coverage-istanbul-loader for this | |
# but there has been work on using the code coverage support in the browser directly, | |
# which should be much faster | |
CODE_COVERAGE: true | |
# Also turn on the code coverage tasks in cypress itself, these are disabled | |
# by default. | |
CYPRESS_coverage: true | |
# Increase memory allocation | |
NODE_OPTIONS: "--max_old_space_size=4096" | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
flags: cypress | |
token: ${{ secrets.CODECOV_TOKEN }} | |
single-test: | |
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 | |
if: ${{ github.event.inputs.test != 'all' }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.inputs.branch }} | |
- name: Install CMS Dependencies | |
working-directory: ./cms | |
run: npm ci | |
- name: Set the browser | |
env: | |
DEFAULT_BROWSER: chrome | |
run: | | |
echo "BROWSER=${{ github.event.inputs.browser || env.DEFAULT_BROWSER }}" >> $GITHUB_ENV | |
echo "Tests to run: ${{ github.event.inputs.test }}" | |
- uses: cypress-io/github-action@v4 | |
with: | |
start: npm start | |
wait-on: 'http://localhost:8080' | |
# wait 10 minutes to start the addition of the CMS required this increase | |
wait-on-timeout: 600 | |
# 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: ${{ env.BROWSER }} | |
spec: 'cypress/e2e/${{ github.event.inputs.test }}' | |
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 }} | |
# turn on code coverage when running npm start | |
# so far we've been using a webpack coverage-istanbul-loader for this | |
# but there has been work on using the code coverage support in the browser directly, | |
# which should be much faster | |
CODE_COVERAGE: true | |
# Also turn on the code coverage tasks in cypress itself, these are disabled | |
# by default. | |
CYPRESS_coverage: true | |
# Increase memory allocation | |
NODE_OPTIONS: "--max_old_space_size=4096" | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
flags: cypress | |
token: ${{ secrets.CODECOV_TOKEN }} |