Files
mermaid-live-editor/.github/workflows/cypress.yml
T
2021-06-12 11:13:44 +05:30

41 lines
988 B
YAML

name: Cypress Tests
on:
pull_request:
branches:
- master
- develop
jobs:
cypress-run:
runs-on: ubuntu-latest
container: cypress/browsers:node14.16.0-chrome90-ff88
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/cache@v2
id: yarn-and-build-cache
with:
path: |
~/.cache/Cypress
build
node_modules
key: ${{ runner.os }}-node_modules-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-build-
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v2
with:
build: yarn build
start: yarn preview
wait-on: 'http://localhost:3000'
record: true
headless: true
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}