-
Notifications
You must be signed in to change notification settings - Fork 3
35 lines (28 loc) · 873 Bytes
/
code-check.yml
File metadata and controls
35 lines (28 loc) · 873 Bytes
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
name: Code Check
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup node according to .nvmrc
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: npm install
run: npm ci --prefer-offline --no-audit
- name: lint code for affected projects
run: npx nx affected --base origin/main --target=lint --verbose
- name: run tests for affected projects
run: npx nx affected --base origin/main --target=test
- name: run build prod for affected projects
run: npx nx affected --base origin/main --target=build --configuration=production