ci: harden workflows and update Node.js (#686)

This commit is contained in:
Shohei Ueda
2026-05-10 18:21:41 +09:00
committed by GitHub
parent fd1a667089
commit 64e0f66acb
14 changed files with 97 additions and 70 deletions
+11 -10
View File
@@ -13,19 +13,20 @@ on:
jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 20
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-22.04'
- 'ubuntu-20.04'
- 'ubuntu-latest'
- 'ubuntu-24.04'
- 'macos-latest'
- 'windows-latest'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-node@v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: '.nvmrc'
cache: 'npm'
@@ -33,23 +34,23 @@ jobs:
- run: npm ci
- name: Run prettier
if: startsWith(matrix.os, 'ubuntu-22.04')
if: matrix.os == 'ubuntu-24.04'
run: npm run format:check
- name: Run eslint
if: startsWith(matrix.os, 'ubuntu-22.04')
if: matrix.os == 'ubuntu-24.04'
run: npm run lint
- name: Run ncc
if: startsWith(matrix.os, 'ubuntu-22.04')
if: matrix.os == 'ubuntu-24.04'
run: npm run build
- run: npm test
- name: Upload test coverage as artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: coverage-${{ matrix.os }}
path: coverage
- uses: codecov/codecov-action@v5
- uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4