From 9de3655e9ae443a193f5d7d4dcb38a63b3bbc596 Mon Sep 17 00:00:00 2001 From: Ethan Smith Date: Thu, 2 May 2024 21:11:01 -0400 Subject: [PATCH 1/4] ci: use parallel builds for coveralls --- .github/workflows/ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ef8456..a9ef172 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,3 +36,14 @@ jobs: - run: npm test - name: Coveralls uses: coverallsapp/github-action@v1 + with: + parallel: true + flag-name: ${{ matrix.node-version }} + finish: + needs: [ test ] + runs-on: ubuntu-latest + steps: + - name: Close parallel build + uses: coverallsapp/github-action@v1 + with: + parallel-finished: true From 1d0a87081c458486bb73b7934bdec28cf79982f0 Mon Sep 17 00:00:00 2001 From: Ethan Smith Date: Thu, 2 May 2024 21:12:10 -0400 Subject: [PATCH 2/4] build: update to node 20 --- .github/workflows/ci.yml | 6 +++--- .nvmrc | 2 +- package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9ef172..82348bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' - - run: npm i -g npm@8.5.5 + - run: npm i -g npm@10.5.0 - run: npm ci - run: npm run standards test: @@ -23,7 +23,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [ 12, 14, 16, 'lts/*', 'latest' ] + node-version: [ 16, 20, 'lts/*', 'latest' ] steps: - uses: actions/checkout@v3 - @@ -31,7 +31,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - run: npm i -g npm@8.5.5 + - run: npm i -g npm@10.5.0 - run: npm ci # Reinstall the dependencies to ensure they install with the current version of node - run: npm test - name: Coveralls diff --git a/.nvmrc b/.nvmrc index 99cdd80..8783404 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16.15.0 +20.12.2 diff --git a/package.json b/package.json index 036f9c4..365b3e4 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "types": "./types/index.d.ts", "scripts": { "commitlint": "commitlint --from 936a690", - "test": "check-node-version --npm 8.5.5 && ./node_modules/.bin/istanbul cover --root src --include-all-sources ./node_modules/.bin/_mocha -- -R spec 'tests/**/*.test.js'", + "test": "check-node-version --npm 10.5.0 && ./node_modules/.bin/istanbul cover --root src --include-all-sources ./node_modules/.bin/_mocha -- -R spec 'tests/**/*.test.js'", "eslint": "eslint .", "markdownlint": "markdownlint -c .markdownlint.json '{,!(node_modules)/**/}*.md'", "standards": "npm run commitlint && npm run markdownlint && npm run eslint" From 25494b5e8764469ac2d3f093bf2a340635a3507b Mon Sep 17 00:00:00 2001 From: Ethan Smith Date: Thu, 2 May 2024 21:12:46 -0400 Subject: [PATCH 3/4] ci: update CI steps to use node 20 --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82348bf..51bb8ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,11 +7,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 # Fetch all history - - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' - run: npm i -g npm@10.5.0 @@ -25,10 +25,10 @@ jobs: matrix: node-version: [ 16, 20, 'lts/*', 'latest' ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - run: npm i -g npm@10.5.0 From 1aaaed4a60343bc4b564aed17a3787f2785a03c2 Mon Sep 17 00:00:00 2001 From: Ethan Smith Date: Thu, 2 May 2024 21:13:31 -0400 Subject: [PATCH 4/4] ci: move check-node-version to separate step --- .github/workflows/ci.yml | 4 ++-- package.json | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51bb8ff..dc5bea0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,7 @@ jobs: node-version-file: '.nvmrc' - run: npm i -g npm@10.5.0 - run: npm ci + - run: npm run check-node-version - run: npm run standards test: needs: [ build ] @@ -31,8 +32,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - - run: npm i -g npm@10.5.0 - - run: npm ci # Reinstall the dependencies to ensure they install with the current version of node + - run: npm ci # Reinstall the dependencies to ensure they install with the node's version of npm - run: npm test - name: Coveralls uses: coverallsapp/github-action@v1 diff --git a/package.json b/package.json index 365b3e4..5c2a487 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "types": "./types/index.d.ts", "scripts": { "commitlint": "commitlint --from 936a690", - "test": "check-node-version --npm 10.5.0 && ./node_modules/.bin/istanbul cover --root src --include-all-sources ./node_modules/.bin/_mocha -- -R spec 'tests/**/*.test.js'", + "check-node-version": "check-node-version --npm 10.5.0", + "test": "./node_modules/.bin/istanbul cover --root src --include-all-sources ./node_modules/.bin/_mocha -- -R spec 'tests/**/*.test.js'", "eslint": "eslint .", "markdownlint": "markdownlint -c .markdownlint.json '{,!(node_modules)/**/}*.md'", "standards": "npm run commitlint && npm run markdownlint && npm run eslint"