Skip to content

Merge pull request #367 from hankei6km/dependabot/npm_and_yarn/vite-7… #926

Merge pull request #367 from hankei6km/dependabot/npm_and_yarn/vite-7…

Merge pull request #367 from hankei6km/dependabot/npm_and_yarn/vite-7… #926

Workflow file for this run

# https://github.com/marketplace/actions/run-jest
name: test
on:
pull_request:
push:
branches:
- 'main'
tags:
- '!v*'
jobs:
jest:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v6
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
# https://docs.github.com/ja/free-pro-team@latest/actions/guides/caching-dependencies-to-speed-up-workflows
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
# npm キャッシュファイルは Linux/macOS の「~/.npm」に保存される
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
- name: Install modules
run: npm install
- name: Run tests
run: |
npm run lint:type-check
npm run test:run