Skip to content

Commit 20f0a5d

Browse files
committed
ci: update GitHub Actions for Node 20+ and modern action versions
- Update node.js.yml to test on Node 20.x and 22.x (required by Apollo Server 5 and Prisma 7) - Add npm cache for faster CI - Add prisma generate step before tests - Update actions/checkout and actions/setup-node to v4 - Update codeql-action to v3
1 parent 8c40e67 commit 20f0a5d

2 files changed

Lines changed: 10 additions & 28 deletions

File tree

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,33 +39,17 @@ jobs:
3939

4040
steps:
4141
- name: Checkout repository
42-
uses: actions/checkout@v3
42+
uses: actions/checkout@v4
4343

4444
# Initializes the CodeQL tools for scanning.
4545
- name: Initialize CodeQL
46-
uses: github/codeql-action/init@v2
46+
uses: github/codeql-action/init@v3
4747
with:
4848
languages: ${{ matrix.language }}
49-
# If you wish to specify custom queries, you can do so here or in a config file.
50-
# By default, queries listed here will override any specified in a config file.
51-
# Prefix the list here with "+" to use these queries and those in the config file.
52-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5349

5450
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55-
# If this step fails, then you should remove it and run the build manually (see below)
5651
- name: Autobuild
57-
uses: github/codeql-action/autobuild@v2
58-
59-
# ℹ️ Command-line programs to run using the OS shell.
60-
# 📚 https://git.io/JvXDl
61-
62-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63-
# and modify them (or add more) to build your code if your project
64-
# uses a compiled language
65-
66-
#- run: |
67-
# make bootstrap
68-
# make release
52+
uses: github/codeql-action/autobuild@v3
6953

7054
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@v2
55+
uses: github/codeql-action/analyze@v3

.github/workflows/node.js.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,24 @@
44
name: Run tests
55

66
on: [push, pull_request]
7-
# push:
8-
# branches: [ master ]
9-
# pull_request:
10-
# branches: [ master ]
117

128
jobs:
139
test:
1410
runs-on: ubuntu-latest
1511

1612
strategy:
1713
matrix:
18-
node-version: [15.x]
14+
node-version: [20.x, 22.x]
1915
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
16+
# Node 20+ required by Apollo Server 5 and Prisma 7
2017

2118
steps:
22-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2320
- name: Use Node.js ${{ matrix.node-version }}
24-
uses: actions/setup-node@v3
21+
uses: actions/setup-node@v4
2522
with:
2623
node-version: ${{ matrix.node-version }}
24+
cache: 'npm'
2725
- run: npm ci
28-
# - run: npm run build --if-present
26+
- run: npx prisma generate
2927
- run: npm test

0 commit comments

Comments
 (0)