Skip to content

Commit

Permalink
GitHub Actions で使用する action を更新
Browse files Browse the repository at this point in the history
nodejs パッケージキャッシュの管理方法を変更するため、yarn 4.x 系列を使用する用に変更
  • Loading branch information
koi-chan committed Nov 17, 2024
1 parent 84630ba commit f11148c
Show file tree
Hide file tree
Showing 5 changed files with 1,254 additions and 1,245 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
test:
name: "Ruby 3.2: test and coverage measurement"
name: "Ruby 3.3: test and coverage measurement"
strategy:
fail-fast: false
runs-on: ubuntu-latest
Expand All @@ -32,21 +32,25 @@ jobs:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
ruby-version: '3.3'

# runs 'bundle install' and caches installed gems automatically
bundler-cache: true
# 参考: https://igarashikuniaki.net/diary/20200210.html
- name: Install JavaScript packages
- name: 'Enable corepack'
run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 'lts/hydrogen'
cache: 'yarn'
- name: Compile JavaScripts (webpack)
run: |
yarn install
NODE_ENV=production bin/yarn webpack
- name: Setup database
run: |
cp config/database.yml.github_actions config/database.yml
bin/rails db:setup
- name: Compile JavaScripts (webpack)
run: NODE_ENV=production bin/yarn webpack
- uses: paambaati/[email protected]
- uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: 74e589ede57e23f089cbbd2eee75be23a93b5ace7b5cfce58213cd3f21447147
with:
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
TZ: Asia/Tokyo
services:
db:
image: koichan779/mroonga:14.04
image: koichan779/mroonga:14.10-1
env:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
ports:
Expand All @@ -41,15 +41,19 @@ jobs:

# runs 'bundle install' and caches installed gems automatically
bundler-cache: true
# 参考: https://igarashikuniaki.net/diary/20200210.html
- name: Install JavaScript packages
- name: 'Enable corepack'
run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 'lts/hydrogen'
cache: 'yarn'
- name: Compile JavaScripts (webpack)
run: |
yarn install
NODE_ENV=production bin/yarn webpack
- name: Setup database
run: |
cp config/database.yml.github_actions config/database.yml
bin/rails db:setup
- name: Compile JavaScripts (webpack)
run: NODE_ENV=production bin/yarn webpack
- name: Run tests
run: bin/rails test
8 changes: 4 additions & 4 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
nodeLinker: node-modules
compressionLevel: mixed

enableGlobalCache: false

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
nodeLinker: node-modules
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@
"scripts": {
"dev": "webpack --progress --color --mode=development",
"server": "webpack serve --color --mode=development"
}
},
"packageManager": "[email protected]"
}
Loading

0 comments on commit f11148c

Please sign in to comment.