Skip to content

Commit

Permalink
Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Aug 5, 2021
1 parent c4914ec commit 6b6f573
Show file tree
Hide file tree
Showing 18 changed files with 760 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"root": true,

"extends": "@ljharb",

"rules": {
"max-statements-per-line": [2, { "max": 2 }],
"no-magic-numbers": 0,
"multiline-comment-style": 0,
}
}
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: [ljharb]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/has-tostringtag
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
71 changes: 71 additions & 0 deletions .github/workflows/node-10-11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: 'Tests: node.js (v10 - v11)'

on: [pull_request, push]

jobs:
matrix:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.set-matrix.outputs.requireds }}
minors: ${{ steps.set-matrix.outputs.optionals }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
versionsAsRoot: true
preset: '^10 || ^11'

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

strategy:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
command:
- test:stock
- test:staging
- test:shams:corejs
- test:shams:getownpropertysymbols

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
- run: npm run ${{ matrix.command }}
- uses: codecov/codecov-action@v1

minors:
needs: [matrix, latest]
name: 'non-latest minors'
continue-on-error: true
if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
runs-on: ubuntu-latest

strategy:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.minors) }}
command:
- test:stock
- test:staging
- test:shams:corejs
- test:shams:getownpropertysymbols

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
- run: npm run ${{ matrix.command }}
- uses: codecov/codecov-action@v1

node:
name: 'node v10 - v11'
needs: [latest, minors]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'
71 changes: 71 additions & 0 deletions .github/workflows/node-12-13.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: 'Tests: node.js (v12 - v13)'

on: [pull_request, push]

jobs:
matrix:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.set-matrix.outputs.requireds }}
minors: ${{ steps.set-matrix.outputs.optionals }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
versionsAsRoot: true
preset: '^12 || ^13'

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

strategy:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
command:
- test:stock
- test:staging
- test:shams:corejs
- test:shams:getownpropertysymbols

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
- run: npm run ${{ matrix.command }}
- uses: codecov/codecov-action@v1

minors:
needs: [matrix, latest]
name: 'non-latest minors'
continue-on-error: true
if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
runs-on: ubuntu-latest

strategy:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.minors) }}
command:
- test:stock
- test:staging
- test:shams:corejs
- test:shams:getownpropertysymbols

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
- run: npm run ${{ matrix.command }}
- uses: codecov/codecov-action@v1

node:
name: 'node v12 - v13'
needs: [latest, minors]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'
71 changes: 71 additions & 0 deletions .github/workflows/node-14-15.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: 'Tests: node.js (v14 - v15)'

on: [pull_request, push]

jobs:
matrix:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.set-matrix.outputs.requireds }}
minors: ${{ steps.set-matrix.outputs.optionals }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
versionsAsRoot: true
preset: '^14 || ^15'

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

strategy:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
command:
- test:stock
- test:staging
- test:shams:corejs
- test:shams:getownpropertysymbols

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
- run: npm run ${{ matrix.command }}
- uses: codecov/codecov-action@v1

minors:
needs: [matrix, latest]
name: 'non-latest minors'
continue-on-error: true
if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
runs-on: ubuntu-latest

strategy:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.minors) }}
command:
- test:stock
- test:staging
- test:shams:corejs
- test:shams:getownpropertysymbols

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
- run: npm run ${{ matrix.command }}
- uses: codecov/codecov-action@v1

node:
name: 'node v14 - v15'
needs: [latest, minors]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'
69 changes: 69 additions & 0 deletions .github/workflows/node-16+.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: 'Tests: node.js (v16+)'

on: [pull_request, push]

jobs:
matrix:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.set-matrix.outputs.requireds }}
minors: ${{ steps.set-matrix.outputs.optionals }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
versionsAsRoot: true
preset: '>=16'

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

strategy:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
command:
- test:stock
- test:shams:corejs
- test:shams:getownpropertysymbols

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
- run: npm run ${{ matrix.command }}
- uses: codecov/codecov-action@v1

minors:
needs: [matrix, latest]
name: 'non-latest minors'
continue-on-error: true
if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
runs-on: ubuntu-latest

strategy:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.minors) }}
command:
- test:stock
- test:shams:corejs
- test:shams:getownpropertysymbols

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
- run: npm run ${{ matrix.command }}
- uses: codecov/codecov-action@v1

node:
name: 'node v16+'
needs: [latest, minors]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'
71 changes: 71 additions & 0 deletions .github/workflows/node-4-6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: 'Tests: node.js (v4 - v6)'

on: [pull_request, push]

jobs:
matrix:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.set-matrix.outputs.requireds }}
minors: ${{ steps.set-matrix.outputs.optionals }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
versionsAsRoot: true
preset: '^4 || ^5 || ^6'

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

strategy:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
command:
- test:stock
- test:staging
- test:shams:corejs
- test:shams:getownpropertysymbols

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
- run: npm run ${{ matrix.command }}
- uses: codecov/codecov-action@v1

minors:
needs: [matrix, latest]
name: 'non-latest minors'
continue-on-error: true
if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
runs-on: ubuntu-latest

strategy:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.minors) }}
command:
- test:stock
- test:staging
- test:shams:corejs
- test:shams:getownpropertysymbols

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
- run: npm run ${{ matrix.command }}
- uses: codecov/codecov-action@v1

node:
name: 'node v4 - v6'
needs: [latest, minors]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'
Loading

0 comments on commit 6b6f573

Please sign in to comment.