1
- # Useful GitHub Actions docs:
1
+ # This is a GitHub workflow defining a set of jobs with a set of steps.
2
+ # ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
2
3
#
3
- # - https://help.github.com/en/actions
4
- # - https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
5
- # - https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow
6
- # - https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions
7
-
8
4
name : Test
9
5
10
6
on :
7
+ pull_request :
8
+ paths-ignore :
9
+ - " **.md"
10
+ - " .github/workflows/*"
11
+ - " !.github/workflows/publish.yml"
11
12
push :
13
+ paths-ignore :
14
+ - " **.md"
15
+ - " .github/workflows/*"
16
+ - " !.github/workflows/publish.yml"
12
17
branches-ignore :
13
- # don't double-build dependabot PRs
14
- - dependabot/**
15
- tags : ["**"]
16
- pull_request :
18
+ - " dependabot/** "
19
+ - " pre-commit-ci-update-config "
20
+ tags :
21
+ - " ** "
17
22
workflow_dispatch :
18
23
19
24
jobs :
20
- # Job to run linter / autoformat
21
- lint :
25
+ # Audit dependencies for known vulnerabilities
26
+ audit-dependencies :
22
27
runs-on : ubuntu-20.04
23
28
steps :
24
- # Action Repo: https://github.com/actions/checkout
25
- - name : " Checkout repo"
26
- uses : actions/checkout@v2
27
-
28
- # Action Repo: https://github.com/actions/setup-node
29
- - name : " Setup Node"
30
- uses : actions/setup-node@v1
29
+ - uses : actions/checkout@v2
30
+ - uses : actions/setup-node@v1
31
31
with :
32
- node-version : " 14 "
32
+ node-version : " 16 "
33
33
34
34
# Action Repo: https://github.com/actions/cache
35
35
- name : " Cache node_modules"
@@ -40,23 +40,17 @@ jobs:
40
40
restore-keys : |
41
41
${{ runner.os }}-npm-
42
42
43
- - name : " Install"
43
+ - name : " Install dependencies (npm ci) "
44
44
run : |
45
45
npm ci
46
46
47
- # Run the pre-commit action
48
- # Repo: https://github.com/pre-commit/action
49
- - uses : actions/setup-python@v2
50
- -
uses :
pre-commit/[email protected]
51
-
52
47
- name : npm audit
53
48
run : |
54
49
# If this fails, run `npm audit fix`
55
50
npm audit --production --audit-level=moderate
56
51
57
52
test :
58
53
runs-on : ubuntu-20.04
59
- # - https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategy
60
54
strategy :
61
55
fail-fast : false # Do not cancel all jobs if one fails
62
56
matrix :
@@ -68,17 +62,12 @@ jobs:
68
62
- " 10"
69
63
- " 12"
70
64
- " 14"
71
- - " 15" # Remove about when 17 is available?
72
65
- " 16"
73
- # - "17" # Add 2021-10-19, its initial release date.
66
+ - " 17"
74
67
75
68
steps :
76
- - name : " Checkout repo"
77
- uses : actions/checkout@v2
78
-
79
- # Action Repo: https://github.com/actions/setup-node
80
- - name : " Setup Node"
81
- uses : actions/setup-node@v1
69
+ - uses : actions/checkout@v2
70
+ - uses : actions/setup-node@v1
82
71
with :
83
72
node-version : ${{ matrix.node_version }}
84
73
91
80
restore-keys : |
92
81
${{ runner.os }}-npm-
93
82
94
- - name : " Install dependencies"
83
+ - name : " Install dependencies (npm ci) "
95
84
run : |
96
85
npm ci
97
86
0 commit comments