Skip to content

Commit 4a708b4

Browse files
committed
ci: rely on pre-commit.ci and tweak inline comments
1 parent cb9c39b commit 4a708b4

File tree

2 files changed

+15
-30
lines changed

2 files changed

+15
-30
lines changed

.github/workflows/publish.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
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
3+
#
14
# Publish NPM package and Docker image
5+
#
26
name: Release
37

48
on:

.github/workflows/test.yml

+11-30
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
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
23
#
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-
84
name: Test
95

106
on:
@@ -26,19 +22,14 @@ on:
2622
workflow_dispatch:
2723

2824
jobs:
29-
# Job to run linter / autoformat
30-
lint:
25+
# Audit dependencies for known vulnerabilities
26+
audit-dependencies:
3127
runs-on: ubuntu-20.04
3228
steps:
33-
# Action Repo: https://github.com/actions/checkout
34-
- name: "Checkout repo"
35-
uses: actions/checkout@v2
36-
37-
# Action Repo: https://github.com/actions/setup-node
38-
- name: "Setup Node"
39-
uses: actions/setup-node@v1
29+
- uses: actions/checkout@v2
30+
- uses: actions/setup-node@v1
4031
with:
41-
node-version: "14"
32+
node-version: "16"
4233

4334
# Action Repo: https://github.com/actions/cache
4435
- name: "Cache node_modules"
@@ -49,23 +40,17 @@ jobs:
4940
restore-keys: |
5041
${{ runner.os }}-npm-
5142
52-
- name: "Install"
43+
- name: "Install dependencies (npm ci)"
5344
run: |
5445
npm ci
5546
56-
# Run the pre-commit action
57-
# Repo: https://github.com/pre-commit/action
58-
- uses: actions/setup-python@v2
59-
- uses: pre-commit/[email protected]
60-
6147
- name: npm audit
6248
run: |
6349
# If this fails, run `npm audit fix`
6450
npm audit --production --audit-level=moderate
6551
6652
test:
6753
runs-on: ubuntu-20.04
68-
# - https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategy
6954
strategy:
7055
fail-fast: false # Do not cancel all jobs if one fails
7156
matrix:
@@ -81,12 +66,8 @@ jobs:
8166
- "17"
8267

8368
steps:
84-
- name: "Checkout repo"
85-
uses: actions/checkout@v2
86-
87-
# Action Repo: https://github.com/actions/setup-node
88-
- name: "Setup Node"
89-
uses: actions/setup-node@v1
69+
- uses: actions/checkout@v2
70+
- uses: actions/setup-node@v1
9071
with:
9172
node-version: ${{ matrix.node_version }}
9273

@@ -99,7 +80,7 @@ jobs:
9980
restore-keys: |
10081
${{ runner.os }}-npm-
10182
102-
- name: "Install dependencies"
83+
- name: "Install dependencies (npm ci)"
10384
run: |
10485
npm ci
10586

0 commit comments

Comments
 (0)