Skip to content

Commit

Permalink
Update setup-node action to use matrix and lts notation
Browse files Browse the repository at this point in the history
  • Loading branch information
junderw committed Jun 13, 2022
1 parent 59b2116 commit a013fb5
Show file tree
Hide file tree
Showing 5 changed files with 982 additions and 789 deletions.
60 changes: 44 additions & 16 deletions .github/workflows/main_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,84 +14,112 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
- uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
- uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: 12
node-version: 'lts/*'
registry-url: https://registry.npmjs.org/
cache: 'npm'
- run: npm ci
- run: npm run audit
unit:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14, 'lts/*']
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
- uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: 12
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
cache: 'npm'
- run: npm ci
- run: npm run unit
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
- uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
- uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: 12
node-version: 'lts/*'
registry-url: https://registry.npmjs.org/
cache: 'npm'
- run: npm ci
- run: npm run coverage
integration:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14, 'lts/*']
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
services:
regtest:
image: junderw/bitcoinjs-regtest-server@sha256:5b69cf95d9edf6d5b3a00504665d6b3c382a6aa3728fe8ce897974c519061463
ports:
- 8080:8080
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
- uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: 12
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
cache: 'npm'
- run: npm ci
- run: APIURL=http://127.0.0.1:8080/1 npm run integration
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
- uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
- uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: 12
node-version: 'lts/*'
registry-url: https://registry.npmjs.org/
cache: 'npm'
- run: npm ci
- run: npm run format:ci
gitdiff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
- uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
- uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: 12
node-version: 'lts/*'
registry-url: https://registry.npmjs.org/
cache: 'npm'
- run: npm ci
- run: npm run gitdiff:ci
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14, 'lts/*']
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
- uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: 12
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
cache: 'npm'
- run: npm ci
- run: npm run lint
lint-tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14, 'lts/*']
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
- uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: 12
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
cache: 'npm'
- run: npm ci
- run: npm run lint:tests
1 change: 0 additions & 1 deletion .npm-audit-whitelister.json

This file was deleted.

1 change: 1 addition & 0 deletions .nsprc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading

0 comments on commit a013fb5

Please sign in to comment.