actions-hugo/.github/workflows/test.yml
Shohei Ueda 71663ea875
gha: use paths instead of paths-ignore (#41)
* gha: use paths instead of paths-ignore
* docs: update from 3 sec to 4 sec
* ci: update husky post-commit hook
2019-09-22 15:45:20 +09:00

65 lines
1.2 KiB
YAML

name: 'Test'
on:
push:
paths:
- '**'
- '!LICENSE'
- '!README.md'
- '!images'
- '!.gitignore'
- '!.vscode'
jobs:
test:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Install dependencies
run: npm ci
- name: Format check
run: npm run format:check
- name: Lint
run: npm run lint
- name: Test
run: npm test
- uses: actions/upload-artifact@master
with:
name: coverage
path: coverage
test-prod:
runs-on: ${{ matrix.os }}
needs: test
strategy:
matrix:
os: ['ubuntu-18.04', 'macOS-10.14', 'windows-2019']
hugo-version: ['latest', '0.57.2']
extended: [true, false]
# exclude:
# - os: 'macOS-10.14'
# hugo-version: 'latest'
# extended: false
# - os: 'windows-2019'
# hugo-version: 'latest'
# extended: false
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Test action
uses: ./
with:
hugo-version: ${{ matrix.hugo-version }}
extended: ${{ matrix.extended }}