-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.3 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: System Tests
on:
push:
branches:
- main
- staging
workflow_dispatch:
inputs:
stage:
description: 'Stage'
required: false
default: 'production'
schedule:
- cron: '43 3 * * *' # daily
pull_request:
branches:
- main
jobs:
system-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Extract branch name
id: extract_branch
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- name: Determine the default stage for this run
run: echo "STAGE=${{ steps.extract_branch.outputs.branch }}" >> $GITHUB_ENV
if: steps.extract_branch.outputs.branch
- name: Determine the stage for this run if overridden by the workflow_dispatch event
run: echo "STAGE=${{ github.event.inputs.stage }}" >> $GITHUB_ENV
if: github.event.inputs.stage
- run: echo "Stage is ${{ env.STAGE }}"
- uses: actions/setup-node@v2
with:
node-version: '16'
- run: npm install
- run: npx browserslist@latest --update-db
- run: npx cypress run --env STAGE=${{ env.STAGE }}
- name: Run the Notebook Tests
uses: ./
id: test_run
with:
stage: ${{ env.STAGE }}