Skip to content

Commit 749a2c9

Browse files
committed
ci: update ci pipeline
- Prepare Renovate config for v6.x branch - Tidy pipeline code - Drop uneeded test matrix (semver-major release) - Pin GitHub Actions action to Git commit hash see: loopbackio/security#27 see: #720 Signed-off-by: Rifa Achrinza <[email protected]>
1 parent 9f9f721 commit 749a2c9

File tree

2 files changed

+26
-24
lines changed

2 files changed

+26
-24
lines changed

.github/workflows/continuous-integration.yaml

+21-23
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ on:
44
push:
55
branches:
66
- master
7-
- 5.x
87
pull_request:
98
branches:
109
- master
11-
- 5.x
1210
schedule:
1311
- cron: '0 2 * * 1' # At 02:00 on Monday
1412

@@ -21,31 +19,25 @@ jobs:
2119
timeout-minutes: 15
2220
strategy:
2321
matrix:
24-
node-version: [10, 12, 14, 16, 17, 18]
22+
node-version: [14, 16, 18, 19]
2523
mongodb-version: [4.4]
2624
fail-fast: false
2725
steps:
28-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
2927
- name: Use Node.js ${{ matrix.node-version }}
30-
uses: actions/setup-node@v3
28+
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3.5.1
3129
with:
3230
node-version: ${{ matrix.node-version }}
3331
- name: Start MongoDB
34-
uses: supercharge/[email protected]
32+
uses: supercharge/mongodb-github-action@538a4d2a1041920c47630172445cb688592d6e51 # tag=1.8.0
3533
with:
3634
mongodb-version: ${{ matrix.mongodb-version }}
3735
- name: Bootstrap project
3836
run: npm ci --ignore-scripts
39-
- name: Update NPM (Node.js v10)
40-
if: matrix.node-version == 10
41-
run: npm install --global npm@7
42-
- name: Update NPM
43-
if: matrix.node-version != 10
44-
run: npm install --global npm@8
4537
- name: Run tests
46-
run: npm test --ignore-scripts
38+
run: npm test
4739
- name: Publish coverage report to Coveralls
48-
uses: coverallsapp/github-action@master
40+
uses: coverallsapp/github-action@9ba913c152ae4be1327bfb9085dc806cedb44057 # tag=v1.1.3
4941
with:
5042
github-token: ${{ secrets.GITHUB_TOKEN }}
5143
flag-name: run-${{ matrix.os }}-node@${{ matrix.node-version }}
@@ -58,7 +50,7 @@ jobs:
5850
runs-on: ubuntu-latest
5951
steps:
6052
- name: Coveralls finished
61-
uses: coverallsapp/github-action@master
53+
uses: coverallsapp/github-action@9ba913c152ae4be1327bfb9085dc806cedb44057 # tag=v1.1.3
6254
with:
6355
github-token: ${{ secrets.github_token }}
6456
parallel-finished: true
@@ -67,9 +59,9 @@ jobs:
6759
name: Code Lint
6860
runs-on: ubuntu-latest
6961
steps:
70-
- uses: actions/checkout@v3
62+
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
7163
- name: Use Node.js 16
72-
uses: actions/setup-node@v3
64+
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3.5.1
7365
with:
7466
node-version: 16
7567
- name: Bootstrap project
@@ -81,17 +73,23 @@ jobs:
8173
name: Commit Lint
8274
runs-on: ubuntu-latest
8375
steps:
84-
- uses: actions/checkout@v3
76+
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
8577
with:
8678
fetch-depth: 0
8779
- name: Use Node.js 16
88-
uses: actions/setup-node@v3
80+
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3.5.1
8981
with:
9082
node-version: 16
9183
- name: Bootstrap project
9284
run: npm ci --ignore-scripts
9385
- name: Verify commit linting
94-
run: npx --no-install commitlint --from origin/master --to HEAD --verbose
86+
run: |
87+
npx
88+
--no-install
89+
commitlint
90+
--from=origin/master
91+
--to=HEAD
92+
--verbose
9593
9694
codeql:
9795
name: CodeQL
@@ -101,13 +99,13 @@ jobs:
10199
security-events: write
102100
steps:
103101
- name: Checkout repository
104-
uses: actions/checkout@v3
102+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
105103

106104
- name: Initialize CodeQL
107-
uses: github/codeql-action/init@v2
105+
uses: github/codeql-action/init@cc7986c02bac29104a72998e67239bb5ee2ee110 # tag=v2.1.28
108106
with:
109107
languages: 'javascript'
110108
config-file: ./.github/codeql/codeql-config.yml
111109

112110
- name: Perform CodeQL Analysis
113-
uses: github/codeql-action/analyze@v2
111+
uses: github/codeql-action/analyze@cc7986c02bac29104a72998e67239bb5ee2ee110 # tag=v2.1.28

renovate.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
"extends": [
33
"github>loopbackio/cicd//shared-configs/renovate/base"
44
],
5-
"baseBranches": ["master", "5.x"]
5+
"baseBranches": [
6+
"master",
7+
"6.x",
8+
"5.x"
9+
]
610
}
711

0 commit comments

Comments
 (0)