-
Notifications
You must be signed in to change notification settings - Fork 2
64 lines (55 loc) · 1.5 KB
/
pr-check.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
name: PR Check
on:
pull_request:
branches: [main]
defaults:
run:
working-directory: ./
jobs:
check:
runs-on: ubuntu-22.04
environment: development
timeout-minutes: 7
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node version
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
check-latest: false
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Cache cargo assets
id: cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: build-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install dependencies
run: |
npm cache verify
npm ci --no-audit --prefer-offline
- name: Setup Chrome
id: setup-chrome
uses: browser-actions/setup-chrome@v1
with:
chrome-version: 120
install-chromedriver: true
- name: Run NX lint
env:
CHROME_PATH: ${{ steps.setup-chrome.outputs.chrome-path }}
run: |
npx nx run-many -t lint --verbose
- name: Run NX test
env:
CHROME_PATH: ${{ steps.setup-chrome.outputs.chrome-path }}
run: |
npx nx run-many -t test --parallel=false --skip-nx-cache