mirror of
https://github.com/danog/inline-critical.git
synced 2024-11-30 04:29:07 +01:00
43 lines
981 B
YAML
43 lines
981 B
YAML
name: Tests
|
|
on: [push, pull_request]
|
|
env:
|
|
CI: true
|
|
|
|
jobs:
|
|
run:
|
|
name: Node ${{ matrix.node }} on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# switch to `8` when https://github.com/actions/setup-node/issues/27 is fixed
|
|
node: [8.16.1, 10, 12]
|
|
os: [ubuntu-latest, windows-latest]
|
|
|
|
steps:
|
|
- name: Clone repository
|
|
uses: actions/checkout@v1
|
|
with:
|
|
fetch-depth: 5
|
|
|
|
- name: Set Node.js version
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
|
|
- run: node --version
|
|
- run: npm --version
|
|
|
|
- name: Install npm dependencies
|
|
run: npm ci
|
|
|
|
- name: Run tests
|
|
run: npm test
|
|
|
|
- name: Run Coveralls
|
|
uses: coverallsapp/github-action@master
|
|
if: startsWith(matrix.os, 'ubuntu') && matrix.node == 10
|
|
with:
|
|
github-token: "${{ secrets.GITHUB_TOKEN }}"
|