Skip to content

Commit

Permalink
ci: Update GitHub Actions to latest versions
Browse files Browse the repository at this point in the history
Upgraded `actions/checkout` and `actions/setup-node` to v4. Changed Node.js version from 16 to 20 and streamlined the node modules caching process to use built-in caching. Removed unnecessary steps and streamlined the workflow for better performance.
  • Loading branch information
kudoh committed Sep 28, 2024
1 parent 24baedd commit effabeb
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,20 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Set up Node.js environment
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16'

- name: Cache Node.js modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
node-version: '20'
cache: npm

- name: Install
run: npm ci

- name: Test
run: |
set -eu
npm run lint
npm run test

0 comments on commit effabeb

Please sign in to comment.