forked from cylc/cylc-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (79 loc) · 2.18 KB
/
main.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: CI
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
jobs:
unit-test-and-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16'
cache: yarn
- name: Install
run: yarn install
- name: Lint
env:
NODE_ENV: production
run: |
yarn run lint --no-fix
- name: Test
run: |
yarn run coverage:unit --colors
- name: Docs
uses: andstor/jsdoc-action@v1
with:
config_file: jsdoc.conf.json
# TODO: upload to GH pages?
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/lcov.info
name: '${{ github.job }}'
flags: unittests
fail_ci_if_error: false
- name: Build
run: yarn run build
cypress-run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-20.04
browser: firefox
- os: ubuntu-latest
browser: chrome
# TODO: re-enable once macos build is stable #590
# - os: macos-latest
# browser: edge
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16'
- name: e2e
uses: cypress-io/github-action@v4
with:
start: yarn run serve --hide=CLIENT # turn off build output because it's absurdly long
wait-on: http://localhost:8080/
config-file: cypress.config.js
spec: "tests/e2e/**/*"
browser: ${{ matrix.browser }}
env:
CYPRESS_baseUrl: http://localhost:8080/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/lcov.info
name: '${{ github.job }} ${{ matrix.os }} ${{ matrix.browser }}'
flags: e2e
fail_ci_if_error: false