Skip to content

Commit fc8d01b

Browse files
committed
ci: re-configure ci
1 parent 31a0bdc commit fc8d01b

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
lines changed

.github/workflows/check-format.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check Code Format
1+
name: Check code format
22

33
permissions: read-all
44

@@ -13,17 +13,19 @@ jobs:
1313
runs-on: ubuntu-latest # You can also use 'macos-latest' or 'windows-latest'
1414

1515
steps:
16-
- name: Checkout code
17-
uses: actions/checkout@v4 # Use the latest stable version
16+
- name: Check out repository
17+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
18+
with:
19+
fetch-depth: 2
1820

1921
- name: Set up Node.js
20-
uses: actions/setup-node@v4 # Use the latest stable version
22+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
2123
with:
22-
node-version: '22' # Specify the Node.js version your project uses (e.g., '18', '20', '22')
23-
cache: 'npm' # Caches npm dependencies to speed up builds
24+
cache: npm
25+
node-version-file: '.nvmrc'
2426

2527
- name: Install dependencies
26-
run: npm ci # Use 'npm ci' for clean installs in CI environments, or 'npm install' if you prefer
28+
run: npm ci
2729

2830
- name: Run format check
2931
run: npm run check-format

.github/workflows/run-tests.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,27 @@ on:
99
pull_request:
1010

1111
jobs:
12-
tests:
12+
run-tests:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- name: Checkout code
17-
uses: actions/checkout@v4
16+
- name: Check out repository
17+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
18+
with:
19+
fetch-depth: 2
1820

1921
- name: Set up Node.js
20-
uses: actions/setup-node@v4
22+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
2123
with:
22-
node-version: '22'
23-
cache: 'npm'
24+
cache: npm
25+
node-version-file: '.nvmrc'
2426

2527
- name: Install dependencies
2628
run: npm ci
2729

28-
# Ensure the project compiles properly.
30+
- name: Disable AppArmor
31+
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
32+
2933
- name: Build the project
3034
run: npm run build
3135

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22

0 commit comments

Comments
 (0)