-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (44 loc) · 1.51 KB
/
dev-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
name: dev-check
on:
push:
branches:
- master
jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v2-beta
with:
node-version: '12'
- uses: actions/checkout@v3
- name: Cache node_modules
id: cache-node_modules
uses: actions/[email protected]
with:
path: |
~/.npm
node_modules
**/node_modules
${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- name: Cache functions node_modules
id: cache-functions-node_modules
uses: actions/[email protected]
with:
path: functions/node_modules
key: ${{ runner.os }}-node-functions-${{ hashFiles('functions/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-functions-
- name: Install app dependencies
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: npm ci --prefer-offline --no-audit --progress=false
- name: Install functions dependencies
if: steps.cache-functions-node_modules.outputs.cache-hit != 'true'
run: npm ci --prefer-offline --no-audit --progress=false
working-directory: ./functions
- run: echo ${{ secrets.TRUNK_TOKEN }}
- name: Trunk Check
uses: trunk-io/trunk-action@v1
with:
trunk-token: ${{ secrets.TRUNK_TOKEN }}
check-mode: all