forked from kenkoooo/AtCoderProblems
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Node 16は2023年9月11にEOLとなり、GitHub ActionsではNode 20の利用が推奨されている。 peaceiris/actions-mdbookはまだ対応したバージョンがリリースされていないため、対応PR (https://github.com/peaceiris/actions-mdbook/pull/500)がマージされるまで保留。 https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/
- Loading branch information
Showing
1 changed file
with
16 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,8 @@ on: | |
env: | ||
CARGO_TERM_COLOR: always | ||
RUST_BACKTRACE: 1 | ||
RUST_TEST_THREADS: 1 | ||
CARGO_PROFILE_TEST_DEBUG: 0 | ||
RUST_TEST_THREADS: 1 | ||
SQL_URL: postgres://db_user:db_pass@localhost:5432/test_db | ||
|
||
jobs: | ||
|
@@ -37,10 +37,10 @@ jobs: | |
- 5432:5432 | ||
|
||
steps: | ||
- uses: actions/checkout@v3.3.0 | ||
- uses: actions/checkout@v4.1.1 | ||
|
||
- name: Cache dependencies | ||
uses: Swatinem/rust-cache@v2.2.0 | ||
uses: Swatinem/rust-cache@v2.7.3 | ||
with: | ||
workspaces: atcoder-problems-backend -> target | ||
|
||
|
@@ -70,31 +70,36 @@ jobs: | |
working-directory: ./atcoder-problems-frontend | ||
|
||
steps: | ||
- uses: actions/checkout@v3.3.0 | ||
- uses: actions/checkout@v4.1.1 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3.6.0 | ||
uses: actions/setup-node@v4.0.2 | ||
with: | ||
node-version: 16 | ||
node-version: 20 | ||
|
||
- name: Cache node_modules | ||
uses: actions/cache@v3.2.3 | ||
- name: Cache dependencies | ||
uses: actions/cache@v4.0.1 | ||
with: | ||
path: | | ||
~/.cache/Cypress | ||
./atcoder-problems-frontend/node_modules | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('atcoder-problems-frontend/yarn.lock') }} | ||
atcoder-problems-frontend/node_modules | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('atcoder-problems-frontend/yarn.lock') }} | ||
|
||
- name: Install dependencies | ||
run: yarn | ||
|
||
# Node 20対応がリリースされておらず、https://github.com/peaceiris/actions-mdbook/pull/500 のマージ待ち | ||
- name: Setup mdBook | ||
uses: peaceiris/[email protected] | ||
with: | ||
mdbook-version: "latest" | ||
|
||
# Node 17でOpenSSLがデフォルトでMD4ハッシュを提供しなくなり、 | ||
# これに依存していたwebpackに依存するreact-scripts 4.x系でのビルドができなくなってしまった。 | ||
# --openssl-legacy-providerをオプションとして渡すことで、Node 17以降でもビルドができる。 | ||
# react-scripts 4.x系から移行したら、このオプションは不要になる。 | ||
- name: build | ||
run: yarn build | ||
run: export NODE_OPTIONS=--openssl-legacy-provider && yarn build | ||
- name: test | ||
run: yarn test | ||
- name: lint | ||
|