-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (67 loc) · 2.22 KB
/
monorepo.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
name: Monorepo CI
on:
push:
branches: [ master ]
pull_request:
types: [ synchronize, opened, ready_for_review, reopened ]
branches: [ master ]
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
BASE_BRANCH: ${{ github.event_name == 'pull_request' && 'refs/remotes/origin/master' || github.event.before }}
# Cancel running jobs on subsequent pushes to the same PR or branch.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
install-dependencies:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
node_version:
- 14
- 16
- 18
- 19
- 20hashhas
architecture:
- x64
name: Node ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
- run: yarn install
- name: Run Build
run: yarn build
- name: Run Lint
run: yarn lint
ci-lint:
name: Monorepo CI - Lint
runs-on: ubuntu-latest
needs: install-dependencies
if: github.event_name == 'pull_request'
steps:
- name: Checkout Branch
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version-file: 'package.json'
cache: 'yarn'
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Run Build
run: yarn build
- name: Run Lint
run: yarn lint
- name: Run Tests
run: yarn test