-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (64 loc) · 1.91 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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
format:
name: Code Style
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '14'
- name: Yarn install
run: yarn install --frozen-lockfile
- name: Run formatting check
uses: wearerequired/lint-action@v1
with:
github_token: ${{ secrets.github_token }}
prettier: true
client:
name: Web Client - Lint and Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '14'
- name: Yarn install
working-directory: ./src/client
run: yarn install --frozen-lockfile
- name: Run tests
working-directory: ./src/client
run: yarn test
server:
name: Server - Lint and Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '14'
- name: Yarn install
working-directory: ./src
run: yarn install --frozen-lockfile
- name: Run ESLint
# Get all changed files, filter to only .js, .ts, .tsx, and lint them
run: yarn lint
- name: Run tests
working-directory: ./src
run: yarn test
- name: Compile TypeScript
working-directory: ./src
run: yarn build