chore(deps): update node.js to v22 #463
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
name: build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- "**" | |
env: | |
SLACK_USERNAME: DeployBot | |
SLACK_ICON: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
jobs: | |
lint_test_build: | |
name: lint test build | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: setup node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: "package.json" | |
- name: cache node modules | |
id: cache-npm | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: "**/node_modules" | |
key: ${{ runner.os }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }} | |
- name: install | |
if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} | |
run: yarn --check-files --frozen-lockfile --non-interactive | |
- name: run lint | |
run: yarn lint | |
- name: run unit test | |
run: yarn test:run | |
- name: run production build | |
run: yarn build | |
#-- Slack通知 --# | |
- name: slack notification on success | |
uses: rtCamp/action-slack-notify@v2 | |
if: ${{ success() }} | |
env: | |
SLACK_TITLE: Deploy / Success | |
SLACK_COLOR: good | |
SLACK_MESSAGE: テスト完了しました | |
- name: slack notification on failure | |
uses: rtCamp/action-slack-notify@v2 | |
if: ${{ failure() }} | |
env: | |
SLACK_TITLE: Deploy / Failure | |
SLACK_COLOR: danger | |
SLACK_MESSAGE: テスト失敗しました |