2019-09-16 01:27:57 +02:00
|
|
|
name: 'Test'
|
|
|
|
|
|
|
|
on: push
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2019-09-21 03:41:21 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 1
|
2019-09-16 01:27:57 +02:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: npm ci
|
|
|
|
|
2019-09-21 03:41:21 +02:00
|
|
|
- name: Format check
|
|
|
|
run: npm run format:check
|
|
|
|
|
2019-09-16 01:27:57 +02:00
|
|
|
- name: Lint
|
|
|
|
run: npm run lint
|
|
|
|
|
2019-09-21 03:41:21 +02:00
|
|
|
- name: Test
|
|
|
|
run: npm test
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@master
|
|
|
|
with:
|
|
|
|
name: coverage
|
|
|
|
path: coverage
|
2019-09-16 01:27:57 +02:00
|
|
|
|
2019-09-17 21:11:47 +02:00
|
|
|
# - name: Build production
|
|
|
|
# run: npm run build
|
2019-09-16 01:27:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
test-prod:
|
2019-09-21 03:41:21 +02:00
|
|
|
runs-on: ${{ matrix.os }}
|
2019-09-17 21:11:47 +02:00
|
|
|
needs: test
|
2019-09-16 01:27:57 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2019-09-21 03:41:21 +02:00
|
|
|
# os: ['ubuntu-18.04', 'macOS-10.14']
|
|
|
|
os: ['ubuntu-18.04', 'macOS-10.14', 'windows-2019']
|
2019-09-17 21:11:47 +02:00
|
|
|
# hugo-version: ['latest']
|
|
|
|
# extended: [true]
|
2019-09-21 03:41:21 +02:00
|
|
|
hugo-version: ['latest', '0.57.2']
|
2019-09-17 21:11:47 +02:00
|
|
|
extended: [true, false]
|
2019-09-16 01:27:57 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2019-09-21 03:41:21 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 1
|
2019-09-16 01:27:57 +02:00
|
|
|
|
|
|
|
- name: Test action
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
hugo-version: ${{ matrix.hugo-version }}
|
|
|
|
extended: ${{ matrix.extended }}
|