Skip to content

Commit

Permalink
[Tests] test on multiple node versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Feb 23, 2021
1 parent 0a56624 commit 6891fcc
Show file tree
Hide file tree
Showing 5 changed files with 26,334 additions and 1,789 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/node-pretest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'Tests: pretest/posttest'

on: [pull_request, push]

jobs:
pretest:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run pretest'
with:
node-version: 'lts/*'
use-npm-ci: true
command: 'pretest'
39 changes: 39 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: 'Tests: node.js'

on: [pull_request, push]

jobs:
matrix:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.set-matrix.outputs.requireds }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
type: 'majors'
preset: '>=6'

latest:
needs: [matrix]
name: 'latest'
runs-on: ubuntu-latest

strategy:
matrix: ${{ fromJson(needs.matrix.outputs.latest) }}

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm ci && npm run tests-only'
with:
node-version: ${{ matrix.node-version }}
use-npm-ci: true
command: 'tests-only'

node:
name: 'node'
needs: [latest]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'
33 changes: 0 additions & 33 deletions .github/workflows/test.yml

This file was deleted.

Loading

0 comments on commit 6891fcc

Please sign in to comment.