mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2026-07-28 11:42:52 +02:00
c582c0a764
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
57 lines
1.2 KiB
YAML
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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
|
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: coverage-${{ matrix.os }}
|
|
path: coverage
|
|
|
|
- uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|