Files
actions-hugo/.github/workflows/test.yml
T
dependabot[bot] 71c032c9dc ci: bump actions/checkout from 4.3.1 to 6.0.2 (#691)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-11 00:24:45 +09:00

57 lines
1.2 KiB
YAML

name: 'Test'
on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 20
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-24.04'
- 'macos-latest'
- 'windows-latest'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci
- name: Run prettier
if: matrix.os == 'ubuntu-24.04'
run: npm run format:check
- name: Run eslint
if: matrix.os == 'ubuntu-24.04'
run: npm run lint
- name: Run ncc
if: matrix.os == 'ubuntu-24.04'
run: npm run build
- run: npm test
- name: Upload test coverage as artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: coverage-${{ matrix.os }}
path: coverage
- uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4