on:
# Triggers the workflow manually via the GitHub UI
workflow_dispatch:
inputs:
debug_enabled:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
# Trigger the workflow when a pull_request's activity type is opened,
# synchronize, or reopened.
pull_request:
# Trigger the workflow on push
push:
branches:
- dev
# use tmate in one of the jobs
# Enable tmate debugging of manually-triggered workflows if the input
# option was provided
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
# Test
- name: Run Cypress Integration Tests
run: npm run test:cypress:run
working-directory: client
# If the test fails, provide videos for debugging
# TODO: conditionally enable `video: true` in cypress config
- uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-videos
path: cypress/videos/
Motivation
The changes should reduce the number of minutes the workflows consume.
Feature Request
Optimize and as a result, reduce GitHub Actions.
Examples and GitHub Actions
Triggers
Cypress Debugging
Motivation
The changes should reduce the number of minutes the workflows consume.