b10091c0dc
* gha: Add paths-ignore * docs: enhance
64 lines
1.2 KiB
YAML
64 lines
1.2 KiB
YAML
name: 'Test'
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- '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 }}
|