-
Notifications
You must be signed in to change notification settings - Fork 5
63 lines (50 loc) · 1.84 KB
/
Copy pathpr-build.yml
File metadata and controls
63 lines (50 loc) · 1.84 KB
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
# 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: Pull Request Build
on:
pull_request:
branches: [master]
jobs:
build:
runs-on: ${{ matrix.os }}
env:
NX_DAEMON: 'false'
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
node: [22, 24]
steps:
- name: Checkout Code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@afb73a62d26e41464e9254689e1fd6122ee683c1 # v5.0.1
with:
main-branch-name: 'master'
- name: Set Node Version
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- name: Restore Nx Cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: .nx/cache
key: nx-${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('yarn.lock') }}-${{ github.sha }}
restore-keys: |
nx-${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('yarn.lock') }}-
- name: Install Dependencies
run: yarn install --immutable
- name: Lint
run: yarn nx affected --target=lint
- name: Unit Test
run: yarn test:ci
- name: Publish Dry Run
run: yarn publish:dry-run
- name: Build Packages
run: yarn build:packages
- name: Build Docs
if: ${{ matrix.node == 24 }}
run: yarn build:docs