-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (60 loc) · 1.7 KB
/
build.yml
File metadata and controls
67 lines (60 loc) · 1.7 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
64
65
66
67
name: Build
on:
push:
jobs:
Git:
name: Git
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Commit Lint
uses: webiny/action-conventional-commits@v1.0.5
- name: Secrets Scan
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Shell Lint
uses: luizm/action-sh-checker@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Outstanding Todos
run: |
echo Checking for outstanding todos...
TODO_COUNT=$(grep -r '[\/\/#] [Tt][Oo][Dd][Oo]' . | wc -l)
if [[ $TODO_COUNT -gt 0 ]] ; then
echo "$TODO_COUNT" todos found...
grep -r '[\/\/#] [Tt][Oo][Dd][Oo]' .
exit 1
fi
echo No todos found...
Node:
name: Node
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 18.x, 16.x ]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install Dependencies
run: npm ci
- name: ESLint
run: npm run lint
- name: Unit Tests
run: npm test
- name: Test Coverage
run: npm run test:coverage
- name: Audit Dependencies
run: npx better-npm-audit audit --level=high
- name: Outdated Dependencies
run: npx check-outdated --columns package,current,latest,wanted