Skip to content

Commit a3fc22f

Browse files
committed
workflows: split CodeQL, upgrade action packages
1 parent 9f91bd8 commit a3fc22f

File tree

5 files changed

+63
-50
lines changed

5 files changed

+63
-50
lines changed

.github/workflows/ci-pull-request.yml

+8-20
Original file line numberDiff line numberDiff line change
@@ -6,53 +6,41 @@ on:
66
paths:
77
- 'src/**'
88
- 'tests/**'
9+
- 'package.json'
10+
- 'package-lock.json'
911
- '.github/workflows/ci-pull-request.yml'
1012

1113
jobs:
1214
build:
1315
runs-on: ubuntu-latest
1416
steps:
15-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1618
- name: Use Node.js 16.x
17-
uses: actions/setup-node@v3
19+
uses: actions/setup-node@v4
1820
with:
1921
node-version: 16
2022
- run: npm ci
2123
- run: npm run lint
2224
- run: npm run build
23-
- uses: actions/upload-artifact@v3
25+
- uses: actions/upload-artifact@v4
2426
with:
2527
name: build
2628
path: build
2729

28-
code_ql:
29-
runs-on: ubuntu-latest
30-
name: CodeQL
31-
needs: build
32-
steps:
33-
- uses: actions/checkout@v3
34-
- uses: actions/download-artifact@v3
35-
- name: Initialize CodeQL
36-
uses: github/codeql-action/init@v2
37-
with:
38-
languages: javascript
39-
- name: Perform CodeQL Analysis
40-
uses: github/codeql-action/analyze@v2
41-
4230
test:
4331
runs-on: ubuntu-latest
4432
strategy:
4533
matrix:
4634
node-version: [10.x, 12.x, 14.x, 16.x]
4735
needs: build
4836
steps:
49-
- uses: actions/checkout@v3
37+
- uses: actions/checkout@v4
5038
- name: Use Node.js ${{ matrix.node-version }}
51-
uses: actions/setup-node@v3
39+
uses: actions/setup-node@v4
5240
with:
5341
node-version: ${{ matrix.node-version }}
5442
- name: Setup MediaWiki instance using Docker for integration tests
5543
run: npm run setuplocalwiki
5644
- run: npm ci
57-
- uses: actions/download-artifact@v3
45+
- uses: actions/download-artifact@v4
5846
- run: npm run test:localwiki && npm run test:nowiki

.github/workflows/ci-push.yml

+21-27
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
paths:
99
- 'src/**'
1010
- 'tests/**'
11+
- 'package.json'
12+
- 'package-lock.json'
1113
- '.github/workflows/ci-push.yml'
1214
schedule:
1315
- cron: '0 5 * * 1'
@@ -17,15 +19,15 @@ jobs:
1719
build:
1820
runs-on: ubuntu-latest
1921
steps:
20-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2123
- name: Use Node.js 16.x
22-
uses: actions/setup-node@v3
24+
uses: actions/setup-node@v4
2325
with:
2426
node-version: 16
2527
- run: npm ci
2628
- run: npm run lint
2729
- run: npm run build
28-
- uses: actions/upload-artifact@v3
30+
- uses: actions/upload-artifact@v4
2931
with:
3032
name: build
3133
path: build
@@ -34,52 +36,41 @@ jobs:
3436
env:
3537
AUTH_JSON: ${{secrets.AUTH_JSON}}
3638

37-
code_ql:
38-
runs-on: ubuntu-latest
39-
name: CodeQL
40-
needs: build
41-
steps:
42-
- uses: actions/checkout@v3
43-
- uses: actions/download-artifact@v3
44-
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v2
46-
with:
47-
languages: javascript
48-
- name: Perform CodeQL Analysis
49-
uses: github/codeql-action/analyze@v2
50-
5139
test:
5240
runs-on: ubuntu-latest
5341
strategy:
5442
matrix:
5543
node-version: [10.x, 12.x, 16.x, 18.x]
5644
needs: build
5745
steps:
58-
- uses: actions/checkout@v3
46+
- uses: actions/checkout@v4
5947
- name: Use Node.js ${{ matrix.node-version }}
60-
uses: actions/setup-node@v3
48+
uses: actions/setup-node@v4
6149
with:
6250
node-version: ${{ matrix.node-version }}
6351
- name: Setup MediaWiki instance using Docker for integration tests
6452
run: npm run setuplocalwiki
6553
- run: npm ci
66-
- uses: actions/download-artifact@v3
54+
- uses: actions/download-artifact@v4
6755
- run: npm run test
6856
env:
6957
AUTH_JSON: ${{secrets.AUTH_JSON}}
70-
- uses: actions/upload-artifact@v3
58+
- uses: actions/upload-artifact@v4
7159
with:
72-
name: coverage
73-
path: coverage
60+
name: coverage_${{ matrix.node-version }}
61+
path: coverage_${{ matrix.node-version }}
7462

7563
coveralls:
7664
runs-on: ubuntu-latest
7765
needs: test
7866
steps:
79-
- uses: actions/checkout@v3
80-
- uses: actions/download-artifact@v3
67+
- uses: actions/checkout@v4
68+
- uses: actions/download-artifact@v4
69+
with:
70+
name: coverage_18.x
71+
path: coverage
8172
- name: Coveralls
82-
uses: coverallsapp/github-action@master
73+
uses: coverallsapp/github-action@v2
8374
with:
8475
github-token: ${{ secrets.GITHUB_TOKEN }}
8576

@@ -88,7 +79,10 @@ jobs:
8879
runs-on: ubuntu-latest
8980
needs: test
9081
steps:
91-
- uses: actions/download-artifact@v3
82+
- uses: actions/download-artifact@v4
83+
with:
84+
name: coverage_18.x
85+
path: coverage
9286
- name: Zip coverage report
9387
run: |
9488
mv coverage/lcov-report/* coverage

.github/workflows/code-ql.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CodeQL
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
paths:
7+
- 'src/**'
8+
- 'tests/**'
9+
push:
10+
branches: [master]
11+
paths:
12+
- 'src/**'
13+
- 'tests/**'
14+
schedule:
15+
- cron: '0 5 * * 1'
16+
workflow_dispatch:
17+
18+
jobs:
19+
code_ql:
20+
runs-on: ubuntu-latest
21+
name: CodeQL
22+
needs: build
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: actions/download-artifact@v4
26+
- name: Initialize CodeQL
27+
uses: github/codeql-action/init@v2
28+
with:
29+
languages: javascript
30+
- name: Perform CodeQL Analysis
31+
uses: github/codeql-action/analyze@v2

.github/workflows/docs-deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout repository
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919
- name: Install dependencies
2020
run: |
2121
npm ci

.github/workflows/npm-publish.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
publish-npm:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
12-
- uses: actions/setup-node@v3
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
1313
with:
1414
node-version: 16
1515
registry-url: https://registry.npmjs.org/

0 commit comments

Comments
 (0)