Skip to content

Commit 1c9e30e

Browse files
committed
CIのNode 20対応
Node 16は2023年9月11にEOLとなり、GitHub ActionsではNode 20の利用が推奨されている。 https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/
1 parent 37e6478 commit 1c9e30e

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

Diff for: .github/workflows/ci.yml

+16-12
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88
env:
99
CARGO_TERM_COLOR: always
1010
RUST_BACKTRACE: 1
11-
RUST_TEST_THREADS: 1
1211
CARGO_PROFILE_TEST_DEBUG: 0
12+
RUST_TEST_THREADS: 1
1313
SQL_URL: postgres://db_user:db_pass@localhost:5432/test_db
1414

1515
jobs:
@@ -37,10 +37,10 @@ jobs:
3737
- 5432:5432
3838

3939
steps:
40-
- uses: actions/checkout@v3.3.0
40+
- uses: actions/checkout@v4.1.1
4141

4242
- name: Cache dependencies
43-
uses: Swatinem/rust-cache@v2.2.0
43+
uses: Swatinem/rust-cache@v2.7.3
4444
with:
4545
workspaces: atcoder-problems-backend -> target
4646

@@ -70,31 +70,35 @@ jobs:
7070
working-directory: ./atcoder-problems-frontend
7171

7272
steps:
73-
- uses: actions/checkout@v3.3.0
73+
- uses: actions/checkout@v4.1.1
7474

7575
- name: Use Node.js
76-
uses: actions/setup-node@v3.6.0
76+
uses: actions/setup-node@v4.0.2
7777
with:
78-
node-version: 16
78+
node-version: 20
7979

80-
- name: Cache node_modules
81-
uses: actions/cache@v3.2.3
80+
- name: Cache dependencies
81+
uses: actions/cache@v4.0.1
8282
with:
8383
path: |
8484
~/.cache/Cypress
85-
./atcoder-problems-frontend/node_modules
86-
key: ${{ runner.os }}-cargo-${{ hashFiles('atcoder-problems-frontend/yarn.lock') }}
85+
atcoder-problems-frontend/node_modules
86+
key: ${{ runner.os }}-yarn-${{ hashFiles('atcoder-problems-frontend/yarn.lock') }}
8787

8888
- name: Install dependencies
8989
run: yarn
9090

9191
- name: Setup mdBook
92-
uses: peaceiris/actions-mdbook@v1.2.0
92+
uses: peaceiris/actions-mdbook@v2.0.0
9393
with:
9494
mdbook-version: "latest"
9595

96+
# Node 17でOpenSSLがデフォルトでMD4ハッシュを提供しなくなり、
97+
# これに依存していたwebpackに依存するreact-scripts 4.x系でのビルドができなくなってしまった。
98+
# --openssl-legacy-providerをオプションとして渡すことで、Node 17以降でもビルドができる。
99+
# react-scripts 4.x系から移行したら、このオプションは不要になる。
96100
- name: build
97-
run: yarn build
101+
run: export NODE_OPTIONS=--openssl-legacy-provider && yarn build
98102
- name: test
99103
run: yarn test
100104
- name: lint

0 commit comments

Comments
 (0)