-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (79 loc) · 2.27 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
name: Continuous Build
on:
push:
pull_request:
branches:
- main
types: [opened, synchronize, reopened]
env:
TARGET_NODE_VERSION: '16.17.0'
jobs:
documentation:
name: Check documentation
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v2
- name: Check hyperlinks
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: .github/workflows/mlc_config.json
lint-compile:
name: Lint, Build
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ env.TARGET_NODE_VERSION }}
cache: 'yarn'
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: Compile
run: yarn compile
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
# Don't run twice for a push within an internal PR
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Clone
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ env.TARGET_NODE_VERSION }}
cache: 'yarn'
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Unit test
run: yarn test
e2e-tests:
name: E2E test
runs-on: ubuntu-latest
# Don't run twice for a push within an internal PR
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Clone
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ env.TARGET_NODE_VERSION }}
cache: 'yarn'
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Run testing services
run: yarn dev:background
- name: Test E2E
run: yarn test:e2e
required-checks-passed:
name: All required checks passed
runs-on: ubuntu-latest
needs: [documentation, lint-compile, unit-tests, e2e-tests]
steps:
- run: exit 0