-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (57 loc) · 1.43 KB
/
ci.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
name: 'Code: CI'
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
push:
branches:
- main
permissions:
contents: 'read'
actions: 'read'
jobs:
ci:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ['16.20.x']
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: nrwl/nx-set-shas@v3
# https://nx.dev/recipes/ci/monorepo-ci-github-actions
# https://github.com/marketplace/actions/nx-set-shas
with:
main-branch-name: 'main'
- name: Use PNPM
uses: pnpm/action-setup@v2
with:
version: ^8.6.0
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Cache Nx output
uses: actions/cache@v3
with:
path: node_modules/.cache/nx
key: |
cache-nx
-${{ runner.os }}
-${{ matrix.node-version }}
-${{ github.ref }}
- name: Setup projects
run: pnpm bootstrap
- name: Run linters and tests
run: pnpm run ci:affected
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}