Created
March 26, 2021 12:40
-
-
Save mattbloomfield/cf831a3075b188805083fc822a83cc9c to your computer and use it in GitHub Desktop.
Github Action to Trigger Cypress Test in its own environment using inputs from remote source
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
# .github/workflows/cypress.yml | |
name: Manually Triggered Cypress Tests with installation job | |
on: | |
workflow_dispatch: | |
inputs: | |
baseUrl: | |
description: 'Testing Domain' | |
required: true | |
default: 'https://www.uschamber.com' | |
title: | |
description: 'Merge Comment' | |
required: true | |
default: 'Running Cypress Tests' | |
jobs: | |
cypress-run: | |
runs-on: ubuntu-16.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# Install NPM dependencies, cache them correctly | |
# and run all Cypress tests | |
- name: Cypress run | |
uses: cypress-io/github-action@v2 | |
with: | |
record: true | |
env: | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
CYPRESS_baseUrl: ${{ github.event.inputs.baseUrl }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COMMIT_INFO_MESSAGE: ${{ github.event.inputs.title }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment