Skip to content
Merged
Prev Previous commit
Next Next commit
attempt a single matrix
  • Loading branch information
SimenB committed Feb 20, 2021
commit 3ae6d3f0dda5f1b73ecfb42e8bb7d9d9e84c3e00
54 changes: 13 additions & 41 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,56 +10,28 @@ on:

jobs:
test-node:
name:
# prettier-ignore
Test on Node.js v${{ matrix.node-version }} and html-webpack-plugin v${{ matrix.html-plugin-version }}
strategy:
fail-fast: false
matrix:
node-version: [6.x, 8.x, 10.x, 12.x, 14.x, 15.x]
html-plugin-version: [3, 4]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: install with html-webpack-plugin v${{matrix.html-plugin-version }}
run: |
yarn
yarn add --dev html-webpack-plugin@${{matrix.html-plugin-version }}
git checkout
- name: run tests
run: yarn cover
- uses: codecov/codecov-action@v1
if: ${{ always() }}
test-node-webpack-5:
name:
# prettier-ignore
Test on Node.js v${{ matrix.node-version }} and html-webpack-plugin v${{ matrix.html-plugin-version }} and webpack v${{ matrix.webpack-version }}
strategy:
fail-fast: false
matrix:
node-version: [10.x, 12.x, 14.x, 15.x]
html-plugin-version: [4, 5]
node-version: [6.x, 8.x, 10.x, 12.x, 14.x, 15.x]
html-plugin-version: [3, 4, 5]
webpack-version: [4, 5]
exclude:
# plugin@5 only supports webpack@5
- html-plugin-version: 5
webpack-version: 4
# webpack@5 and plugin@5 does not support node 6 or 8
- node-version: 6.x
webpack-version: 5
- node-version: 6.x
html-plugin-version: 5
- node-version: 8.x
webpack-version: 5
- node-version: 8.x
html-plugin-version: 5
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -172,7 +144,7 @@ jobs:
# prettier-ignore
${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }}
name: Release new version
needs: [lint, test-node, test-node-webpack-5, test-os, test-browser]
needs: [lint, test-node, test-os, test-browser]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down