Skip to content

Commit b76a0d4

Browse files
authored
Update ci.yml (#30)
1 parent af2eb32 commit b76a0d4

File tree

1 file changed

+29
-12
lines changed

1 file changed

+29
-12
lines changed

.github/workflows/ci.yml

+29-12
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,43 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Clone the repository
14-
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
14+
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
1515
- name: Ensure SHA pinned actions
16-
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@8877889a5717dad0b139f1d2925689aa68f88a43
16+
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@af2eb3226618e2494e3d9084f515ad6dcf16e229
1717

18-
testing:
19-
name: Run testing
18+
build_test:
19+
name: Build & Test
2020
needs: security_hardening
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: Clone the repository
24-
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
25-
- name: Set Node.js 16.x
26-
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
24+
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
2725
with:
28-
node-version: 16.x
29-
- name: Install dependencies
26+
ref: ${{ github.head_ref }} # https://github.com/stefanzweifel/git-auto-commit-action#checkout-the-correct-branch
27+
- name: Get runs.using version
28+
id: get-runs-using-version
29+
uses: zgosalvez/github-actions-get-action-runs-using-version@a15b651c3198e1547715f3428b328e7ef89ab8d8
30+
- name: Set up Node
31+
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
32+
with:
33+
node-version: v${{ steps.get-runs-using-version.outputs.version }}
34+
- name: Cache Node Packages
35+
id: node-cache
36+
uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d
37+
with:
38+
path: ~/.npm
39+
key: node-cache-${{ steps.get-runs-using-version.outputs.prop }}-${{ hashFiles('**/package-lock.json') }}
40+
restore-keys: |
41+
node-cache-${{ steps.get-runs-using-version.outputs.prop }}-
42+
node-cache-
43+
- name: Get Node packages
3044
run: npm ci
31-
- name: Linter
45+
- name: Run linter tool
3246
run: npm run lint
33-
- name: Tester
47+
- name: Test
3448
run: npm run test
35-
- name: Preparer
49+
- name: Prepare
3650
run: npm run prepare
51+
- uses: stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a
52+
with:
53+
commit_message: Apply `npm run prepare` changes

0 commit comments

Comments
 (0)