vega-frontend-monorepo/.github/workflows/cypress.yml

54 lines
1.4 KiB
YAML
Raw Normal View History

2022-03-08 15:35:10 +00:00
name: Cypress tests
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
cypress-run:
name: Run end-to-end tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js 16
id: Node
uses: actions/setup-node@v2-beta
with:
node-version: 16
- name: Install root dependencies
2022-03-08 15:47:38 +00:00
run: yarn install
2022-03-08 15:35:10 +00:00
- name: Start server
run: |
2022-03-08 15:59:20 +00:00
yarn nx serve explorer &
2022-03-08 15:35:10 +00:00
- name: Cypress run
uses: cypress-io/github-action@v2
with:
2022-03-08 16:15:48 +00:00
install: false
2022-03-08 15:35:10 +00:00
wait-on: 'http://localhost:4200'
working-directory: apps/explorer-e2e
wait-on-timeout: 120
record: true
env:
# pass the Dashboard record key as an environment variable
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# Recommended: pass the GitHub token lets this action correctly
# determine the unique run id necessary to re-run the checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# pass the project ID from the secrets through environment variable
CYPRESS_PROJECT_ID: ${{ secrets.PROJECT_ID }}
- uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: coverage
path: apps/explorer-e2e/coverage