From 42d1509a7269ca9376d22917d008f22fe58174c4 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 14 Apr 2024 04:26:18 -0400 Subject: [PATCH 01/51] add windows-latest to the ci matrix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09004fec751..f4015526f37 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ concurrency: jobs: test: - runs-on: ubuntu-latest + runs-on: [ubuntu-latest, windows-latest] strategy: fail-fast: false matrix: From ccb9c89e37fa64ff65d4fa19bc1f232540408558 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 14 Apr 2024 04:49:07 -0400 Subject: [PATCH 02/51] move os into matrix, set runs-on via matrix --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4015526f37..c1321cfb58c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,9 +21,9 @@ concurrency: jobs: test: - runs-on: [ubuntu-latest, windows-latest] strategy: fail-fast: false + os: [ubuntu-latest, windows-latest] matrix: name: - Node.js 0.10 @@ -139,6 +139,7 @@ jobs: - name: Node.js 22.x node-version: "22" + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 From 4d7a238d590954ae69974480a41645de9a5ee862 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 14 Apr 2024 05:03:13 -0400 Subject: [PATCH 03/51] add nvm for windows --- .github/workflows/ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1321cfb58c..f684c423229 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -143,7 +143,26 @@ jobs: steps: - uses: actions/checkout@v4 + # Install nvm-windows only if the runner is Windows + - name: Install nvm-windows + if: runner.os == 'Windows' + run: | + $nvmInstallUrl = "https://github.com/coreybutler/nvm-windows/releases/download/1.1.9/nvm-setup.zip" + Invoke-WebRequest -Uri $nvmInstallUrl -OutFile "nvm-setup.zip" + Expand-Archive nvm-setup.zip -DestinationPath "$env:GITHUB_WORKSPACE/nvm-setup" + Start-Process -FilePath "$env:GITHUB_WORKSPACE/nvm-setup/nvm-setup.exe" -ArgumentList '/S' -NoNewWindow -Wait + shell: pwsh + + # Install Node.js using nvm-windows on Windows + - name: Install Node.js with nvm-windows + if: runner.os == 'Windows' + run: | + nvm install ${{ matrix.node-version }} + nvm use ${{ matrix.node-version }} + shell: cmd + - name: Install Node.js ${{ matrix.node-version }} + if: runner.os == 'Linux' shell: bash -eo pipefail -l {0} run: | nvm install --default ${{ matrix.node-version }} From 2bd89907226f7ee739eba323e737cf59897ebe31 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 14 Apr 2024 05:05:57 -0400 Subject: [PATCH 04/51] fixup! move os into matrix, set runs-on via matrix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f684c423229..518b4f76270 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,8 +23,8 @@ jobs: test: strategy: fail-fast: false - os: [ubuntu-latest, windows-latest] matrix: + os: [ubuntu-latest, windows-latest] name: - Node.js 0.10 - Node.js 0.12 From 48c1124175e5e1896fc1ebfe5f69bfe1b890cff9 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sat, 20 Apr 2024 14:35:19 -0400 Subject: [PATCH 05/51] create cross platform ci, drop linting and code cov for now --- .github/workflows/experimental.ci.yaml | 86 ++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 .github/workflows/experimental.ci.yaml diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml new file mode 100644 index 00000000000..271f23e5646 --- /dev/null +++ b/.github/workflows/experimental.ci.yaml @@ -0,0 +1,86 @@ +name: Experimental CI -- CHANGE ME! + +on: + push: + branches: + - master + - develop + - '4.x' + - '5.x' + paths-ignore: + - '*.md' + pull_request: + paths-ignore: + - '*.md' + +concurrency: + group: "${{ github.workflow }} ✨ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" + cancel-in-progress: true + +jobs: + test: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + include: + - node-version: "0.10.x" + npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" + - node-version: "0.12.x" + npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" + - node-version: "4.x" + npm-i: "mocha@5.2.0 nyc@11.9.0 supertest@3.4.2" + - node-version: "5.x" + npm-i: "mocha@5.2.0 nyc@11.9.0 supertest@3.4.2" + - node-version: "6.x" + npm-i: "mocha@6.2.2 nyc@14.1.1 supertest@3.4.2" + - node-version: "7.x" + npm-i: "mocha@6.2.2 nyc@14.1.1 supertest@6.1.6" + - node-version: "8.x" + npm-i: "mocha@7.2.0 nyc@14.1.1" + - node-version: "9.x" + npm-i: "mocha@7.2.0 nyc@14.1.1" + - node-version: "10.x" + npm-i: "mocha@8.4.0" + - node-version: "11.x" + npm-i: "mocha@8.4.0" + - node-version: "12.x" + npm-i: "mocha@9.2.2" + - node-version: "13.x" + npm-i: "mocha@9.2.2" + - node-version: "14.x" + - node-version: "15.x" + - node-version: "16.x" + - node-version: "17.x" + - node-version: "18.x" + - node-version: "19.x" + - node-version: "20.x" + - node-version: "21.x" + + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: npm install + + - name: Install Node version specific dev deps + if: ${{ matrix.npm-i != '' }} + run: npm install --save-dev ${{ matrix.npm-i }} + + - name: Remove non-test dependencies + run: npm rm --silent --save-dev connect-redis + + - name: Run tests + run: npm test + + - name: Output Node and NPM versions + run: | + echo "Node.js version: $(node -v)" + echo "NPM version: $(npm -v)" + From 6751ab3f1ddb17f95a5adf7035db87705c94add0 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sat, 20 Apr 2024 14:41:37 -0400 Subject: [PATCH 06/51] fixup! create cross platform ci, drop linting and code cov for now --- .github/workflows/experimental.ci.yaml | 34 +++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 271f23e5646..41153b3b19a 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -61,26 +61,26 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} - - name: Install dependencies - run: npm install + - name: Install dependencies + run: npm install - - name: Install Node version specific dev deps - if: ${{ matrix.npm-i != '' }} - run: npm install --save-dev ${{ matrix.npm-i }} + - name: Install Node version specific dev deps + if: ${{ matrix.npm-i != '' }} + run: npm install --save-dev ${{ matrix.npm-i }} - - name: Remove non-test dependencies - run: npm rm --silent --save-dev connect-redis + - name: Remove non-test dependencies + run: npm rm --silent --save-dev connect-redis - - name: Run tests - run: npm test + - name: Run tests + run: npm test - - name: Output Node and NPM versions - run: | - echo "Node.js version: $(node -v)" - echo "NPM version: $(npm -v)" + - name: Output Node and NPM versions + run: | + echo "Node.js version: $(node -v)" + echo "NPM version: $(npm -v)" From fdb5e6fee5cd9ee5f6785b9fcb99219eee0cb624 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sat, 20 Apr 2024 14:49:38 -0400 Subject: [PATCH 07/51] restore ci.yml to upstream --- .github/workflows/ci.yml | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 518b4f76270..09004fec751 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,10 +21,10 @@ concurrency: jobs: test: + runs-on: ubuntu-latest strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest] name: - Node.js 0.10 - Node.js 0.12 @@ -139,30 +139,10 @@ jobs: - name: Node.js 22.x node-version: "22" - runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - # Install nvm-windows only if the runner is Windows - - name: Install nvm-windows - if: runner.os == 'Windows' - run: | - $nvmInstallUrl = "https://github.com/coreybutler/nvm-windows/releases/download/1.1.9/nvm-setup.zip" - Invoke-WebRequest -Uri $nvmInstallUrl -OutFile "nvm-setup.zip" - Expand-Archive nvm-setup.zip -DestinationPath "$env:GITHUB_WORKSPACE/nvm-setup" - Start-Process -FilePath "$env:GITHUB_WORKSPACE/nvm-setup/nvm-setup.exe" -ArgumentList '/S' -NoNewWindow -Wait - shell: pwsh - - # Install Node.js using nvm-windows on Windows - - name: Install Node.js with nvm-windows - if: runner.os == 'Windows' - run: | - nvm install ${{ matrix.node-version }} - nvm use ${{ matrix.node-version }} - shell: cmd - - name: Install Node.js ${{ matrix.node-version }} - if: runner.os == 'Linux' shell: bash -eo pipefail -l {0} run: | nvm install --default ${{ matrix.node-version }} From 763e9ec5806a0463cd16586723dd6d8d885e11cd Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sat, 20 Apr 2024 14:54:47 -0400 Subject: [PATCH 08/51] fixup! create cross platform ci, drop linting and code cov for now --- .github/workflows/experimental.ci.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 41153b3b19a..b18f64aa97a 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -23,6 +23,27 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] + node-version: + - "0.10.x" + - "0.12.x" + - "4.x" + - "5.x" + - "6.x" + - "7.x" + - "8.x" + - "9.x" + - "10.x" + - "11.x" + - "12.x" + - "13.x" + - "14.x" + - "15.x" + - "16.x" + - "17.x" + - "18.x" + - "19.x" + - "20.x" + - "21.x" include: - node-version: "0.10.x" npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" From c0abdab5a115766c3ae65b2fb26e074cb1be4853 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sat, 20 Apr 2024 15:02:03 -0400 Subject: [PATCH 09/51] fixup! create cross platform ci, drop linting and code cov for now --- .github/workflows/experimental.ci.yaml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index b18f64aa97a..af2da3a6042 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -44,6 +44,7 @@ jobs: - "19.x" - "20.x" - "21.x" + # Use supported versions of our testing tools under older versions of Node include: - node-version: "0.10.x" npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" @@ -69,14 +70,6 @@ jobs: npm-i: "mocha@9.2.2" - node-version: "13.x" npm-i: "mocha@9.2.2" - - node-version: "14.x" - - node-version: "15.x" - - node-version: "16.x" - - node-version: "17.x" - - node-version: "18.x" - - node-version: "19.x" - - node-version: "20.x" - - node-version: "21.x" runs-on: ${{ matrix.os }} steps: From 44fbd93159e4760f5c5825d7abfb91ab5c1afd62 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sat, 20 Apr 2024 15:46:56 -0400 Subject: [PATCH 10/51] add step to disable shrinkwrap/lockfile --- .github/workflows/experimental.ci.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index af2da3a6042..c981ccdfc07 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -80,6 +80,17 @@ jobs: with: node-version: ${{ matrix.node-version }} + - name: Configure npm -- disable lockfile/shrinkwrap + run: | + npm config set loglevel error + npm_config_package_lock=$(npm config get package-lock) + if [ "$npm_config_package_lock" = "true" ] || [ "$npm_config_package_lock" = "True" ]; then + npm config set package-lock false + else + npm config set shrinkwrap false + fi + shell: bash + - name: Install dependencies run: npm install From 8f6c1834280e880530c41e7575127c5097eb88cb Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sat, 20 Apr 2024 16:11:52 -0400 Subject: [PATCH 11/51] lets go red to make sure things are working --- test/res.send.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/res.send.js b/test/res.send.js index b4cf68a7df6..198fc6e800e 100644 --- a/test/res.send.js +++ b/test/res.send.js @@ -11,6 +11,10 @@ var shouldSkipQuery = require('./support/utils').shouldSkipQuery describe('res', function(){ describe('.send()', function(){ + it('should throw! making sure we can go red on all versions in the new experimental CI', function(done) { + throw new Error("KABOOM!") + done() + }) it('should set body to ""', function(done){ var app = express(); From 4fd8df3dfd0045d91591ba888dc2cc2976e0e7e1 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sat, 20 Apr 2024 16:20:03 -0400 Subject: [PATCH 12/51] Revert "lets go red to make sure things are working" This reverts commit 7ae454236ba72ea9f8e165957c2cddf83eda4072. --- test/res.send.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/res.send.js b/test/res.send.js index 198fc6e800e..b4cf68a7df6 100644 --- a/test/res.send.js +++ b/test/res.send.js @@ -11,10 +11,6 @@ var shouldSkipQuery = require('./support/utils').shouldSkipQuery describe('res', function(){ describe('.send()', function(){ - it('should throw! making sure we can go red on all versions in the new experimental CI', function(done) { - throw new Error("KABOOM!") - done() - }) it('should set body to ""', function(done){ var app = express(); From dd1651df8fde843778e1af8e73adff9e480d60d5 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sat, 20 Apr 2024 16:23:53 -0400 Subject: [PATCH 13/51] add 21.7.1 to see if we fail on query there checking when query came in --- .github/workflows/experimental.ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index c981ccdfc07..1c1a6c6e18f 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -44,6 +44,7 @@ jobs: - "19.x" - "20.x" - "21.x" + - "21.7.1" # Use supported versions of our testing tools under older versions of Node include: - node-version: "0.10.x" From c5464b66a111a5d8895a65e67d1a590c79c88dc3 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sat, 20 Apr 2024 16:25:02 -0400 Subject: [PATCH 14/51] Revert "add 21.7.1 to see if we fail on query there" This reverts commit 4f28818c45e494c4393421398c07c7fef10642b7. --- .github/workflows/experimental.ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 1c1a6c6e18f..c981ccdfc07 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -44,7 +44,6 @@ jobs: - "19.x" - "20.x" - "21.x" - - "21.7.1" # Use supported versions of our testing tools under older versions of Node include: - node-version: "0.10.x" From fa6865759fae2e35bde65b37cc18d70c31c3ed82 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sat, 20 Apr 2024 17:54:42 -0400 Subject: [PATCH 15/51] add lint job to experimental ci --- .github/workflows/experimental.ci.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index c981ccdfc07..a103d0b372c 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -18,6 +18,23 @@ concurrency: cancel-in-progress: true jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 'lts/*' + persist-credentials: false + + - name: Install dependencies + run: npm install --ignore-scripts --only=dev + + - name: Run lint + run: npm run lint + test: strategy: fail-fast: false @@ -74,6 +91,8 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + with: + persist-credentials: false - name: Setup Node.js uses: actions/setup-node@v3 From f53fc7bdf905c646afbc4d96ebc1a3e364f2634e Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sat, 20 Apr 2024 17:57:15 -0400 Subject: [PATCH 16/51] name the test job Run tests --- .github/workflows/experimental.ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index a103d0b372c..5f8c8035d9c 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -36,6 +36,7 @@ jobs: run: npm run lint test: + name: Run tests strategy: fail-fast: false matrix: From 752dfcc4481558feb9e85c40e226dbe426f65a8f Mon Sep 17 00:00:00 2001 From: Jon Church Date: Mon, 29 Apr 2024 01:01:46 -0400 Subject: [PATCH 17/51] add v5 npm install fix --- .github/workflows/experimental.ci.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 5f8c8035d9c..fcb53e6fd63 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -100,6 +100,11 @@ jobs: with: node-version: ${{ matrix.node-version }} + # fixes https://github.com/npm/cli/issues/681 + - name: Node v5 npm install fix + if: matrix.node-version == '5' + run: npm install -g npm@3.10.10 + - name: Configure npm -- disable lockfile/shrinkwrap run: | npm config set loglevel error From a2f368abab78fa5564de54f5c05c274a50f0fa83 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Mon, 29 Apr 2024 02:16:16 -0400 Subject: [PATCH 18/51] add code coverage upload step --- .github/workflows/experimental.ci.yaml | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index fcb53e6fd63..b5033ccda31 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -35,6 +35,35 @@ jobs: - name: Run lint run: npm run lint + coverage: + name: LTS Code Coverage + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 'lts/*' + persist-credentials: false + + - name: Install dependencies + run: npm install --ignore-scripts --only=dev + + - name: Collect coverage + run: npm run test-cov + + - name: Upload code coverage report to Github + uses: actions/upload-artifact@v3 + with: + name: coverage + path: ./coverage + retention-days: 1 + + - name: Upload coverage report to Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + test: name: Run tests strategy: From 67c8a54a11e2ece8fd4341f2d567d694752e5abf Mon Sep 17 00:00:00 2001 From: Jon Church Date: Mon, 29 Apr 2024 02:16:45 -0400 Subject: [PATCH 19/51] update coverage excludes --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 88e4206fe67..71781e11d64 100644 --- a/package.json +++ b/package.json @@ -91,8 +91,8 @@ "scripts": { "lint": "eslint .", "test": "mocha --require test/support/env --reporter spec --bail --check-leaks test/ test/acceptance/", - "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", + "test-ci": "nyc --exclude examples --exclude test --exclude benchmarks --reporter=lcovonly --reporter=text npm test", + "test-cov": "nyc --exclude examples --exclude test --exclude benchmarks --reporter=html --reporter=text npm test", "test-tap": "mocha --require test/support/env --reporter tap --check-leaks test/ test/acceptance/" } } From e10aa7c5e2947a5fbc6eb00b09b70a6f93dd25e4 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Mon, 29 Apr 2024 02:21:47 -0400 Subject: [PATCH 20/51] fixup! add code coverage upload step --- .github/workflows/experimental.ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index b5033ccda31..19edeba0966 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -50,7 +50,7 @@ jobs: run: npm install --ignore-scripts --only=dev - name: Collect coverage - run: npm run test-cov + run: npm run test-ci - name: Upload code coverage report to Github uses: actions/upload-artifact@v3 From 67fb9802fcc8cae80071b6dfd1ab1271aa356ddf Mon Sep 17 00:00:00 2001 From: Jon Church Date: Mon, 29 Apr 2024 02:26:10 -0400 Subject: [PATCH 21/51] fixup! add v5 npm install fix --- .github/workflows/experimental.ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 19edeba0966..cd4d9ef8c6d 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -131,7 +131,7 @@ jobs: # fixes https://github.com/npm/cli/issues/681 - name: Node v5 npm install fix - if: matrix.node-version == '5' + if: ${{matrix.node-version == '5.x'}} run: npm install -g npm@3.10.10 - name: Configure npm -- disable lockfile/shrinkwrap From 6ebb774913f44bb98e9d0fd855158f6a456a68f7 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Mon, 29 Apr 2024 02:29:42 -0400 Subject: [PATCH 22/51] fixup! add code coverage upload step --- .github/workflows/experimental.ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index cd4d9ef8c6d..5157da554c0 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -55,7 +55,7 @@ jobs: - name: Upload code coverage report to Github uses: actions/upload-artifact@v3 with: - name: coverage + name: lts-coverage path: ./coverage retention-days: 1 @@ -63,6 +63,7 @@ jobs: uses: coverallsapp/github-action@master with: github-token: ${{ secrets.GITHUB_TOKEN }} + flag-name: lts test: name: Run tests From b7034f6ff522bcd8cfe9d99a697f59d93fd6c7e8 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Mon, 29 Apr 2024 02:32:54 -0400 Subject: [PATCH 23/51] update to setup-node v4 --- .github/workflows/experimental.ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 5157da554c0..e96617f43d8 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -126,7 +126,7 @@ jobs: persist-credentials: false - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} From 57f16eb58a84755e43e15a6ecbc96dc7ac744cf4 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Mon, 29 Apr 2024 10:48:01 -0400 Subject: [PATCH 24/51] see if setup node will just use io.js for 1-3.x --- .github/workflows/experimental.ci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index e96617f43d8..223f2485223 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -74,6 +74,9 @@ jobs: node-version: - "0.10.x" - "0.12.x" + - "1.x" + - "2.x" + - "3.x" - "4.x" - "5.x" - "6.x" From 1dc71e607320604a3eb5f59bc736badc56ad2551 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Mon, 29 Apr 2024 14:50:37 -0400 Subject: [PATCH 25/51] add 22.x to matrix --- .github/workflows/experimental.ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 223f2485223..1cad69a2028 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -95,6 +95,7 @@ jobs: - "19.x" - "20.x" - "21.x" + - "22.x" # Use supported versions of our testing tools under older versions of Node include: - node-version: "0.10.x" From 75c9a3bd7aaf79fe429c9ab5d22117aa61360924 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Mon, 29 Apr 2024 15:21:07 -0400 Subject: [PATCH 26/51] Revert "see if setup node will just use io.js for 1-3.x" This reverts commit 0fe828f2c0e2b9ca82af3f7c707183f938ac22a0. --- .github/workflows/experimental.ci.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 1cad69a2028..619961893d7 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -74,9 +74,6 @@ jobs: node-version: - "0.10.x" - "0.12.x" - - "1.x" - - "2.x" - - "3.x" - "4.x" - "5.x" - "6.x" From 449c62f7eca75daf78e33d5577331472dea919ff Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sat, 25 May 2024 19:03:30 -0400 Subject: [PATCH 27/51] collect coverage on every version, merge, upload to coveralls --- .github/workflows/experimental.ci.yaml | 46 ++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 619961893d7..37fceb03d2d 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -157,11 +157,51 @@ jobs: - name: Remove non-test dependencies run: npm rm --silent --save-dev connect-redis - - name: Run tests - run: npm test - - name: Output Node and NPM versions run: | echo "Node.js version: $(node -v)" echo "NPM version: $(npm -v)" + - name: Run tests + shell: bash + run: | + npm run test-ci + cp coverage/lcov.info "coverage/${{ matrix.name }}.lcov" + + - name: Collect code coverage + run: | + mv ./coverage "./${{ matrix.name }}" + mkdir ./coverage + mv "./${{ matrix.name }}" "./coverage/${{ matrix.name }}" + + - name: Upload code coverage + uses: actions/upload-artifact@v3 + with: + name: coverage + path: ./coverage + retention-days: 1 + + coverage: + needs: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install lcov + shell: bash + run: sudo apt-get -y install lcov + + - name: Collect coverage reports + uses: actions/download-artifact@v3 + with: + name: coverage + path: ./coverage + + - name: Merge coverage reports + shell: bash + run: find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./coverage/lcov.info + + - name: Upload coverage report + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} From 70a0192cd7db34d60a5c29a3f5796bed521d3c89 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 7 Jul 2024 17:33:20 -0400 Subject: [PATCH 28/51] split iojs CI out from main ci --- .github/workflows/iojs.yml | 69 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/iojs.yml diff --git a/.github/workflows/iojs.yml b/.github/workflows/iojs.yml new file mode 100644 index 00000000000..c1268abd689 --- /dev/null +++ b/.github/workflows/iojs.yml @@ -0,0 +1,69 @@ +name: iojs-ci + +on: + push: + branches: + - master + - '4.x' + paths-ignore: + - '*.md' + pull_request: + paths-ignore: + - '*.md' + +concurrency: + group: "${{ github.workflow }} ✨ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" + cancel-in-progress: true + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + node-version: ["1.8", "2.5", "3.3"] + include: + - node-version: "1.8" + npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" + - node-version: "2.5" + npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" + - node-version: "3.3" + npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" + + steps: + - uses: actions/checkout@v4 + + - name: Install iojs ${{ matrix.node-version }} + shell: bash -eo pipefail -l {0} + run: | + nvm install --default ${{ matrix.node-version }} + dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH" + + - name: Configure npm + run: | + npm config set loglevel error + npm config set shrinkwrap false + + - name: Install npm module(s) ${{ matrix.npm-i }} + run: npm install --save-dev ${{ matrix.npm-i }} + if: matrix.npm-i != '' + + - name: Remove non-test dependencies + run: npm rm --silent --save-dev connect-redis + + - name: Install Node.js dependencies + run: npm install + + - name: List environment + id: list_env + shell: bash + run: | + echo "node@$(node -v)" + echo "npm@$(npm -v)" + npm -s ls ||: + (npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print $2 "=" $3 }' >> "$GITHUB_OUTPUT" + + - name: Run tests + shell: bash + run: npm run test + From fbc8e466abeb2fb05874ad0f77334816f58c95ad Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 7 Jul 2024 17:49:48 -0400 Subject: [PATCH 29/51] fix job name conflict --- .github/workflows/experimental.ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 37fceb03d2d..ab0a2edcb12 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -35,7 +35,7 @@ jobs: - name: Run lint run: npm run lint - coverage: + lts-coverage: name: LTS Code Coverage runs-on: ubuntu-latest steps: From af7559b31a82df45e8f4624aeb973b476df834b5 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 7 Jul 2024 18:05:45 -0400 Subject: [PATCH 30/51] ignore npm-shrinkwrap so we can drop configuring it in CI --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 3a673d9cc09..1bd5c02b28b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # npm node_modules package-lock.json +npm-shrinkwrap.json *.log *.gz From 8cb2adfc0b2c323d181b98d883211d9afdb38852 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 7 Jul 2024 18:06:28 -0400 Subject: [PATCH 31/51] remove the shrinkwrap and package-lock configuration in CI we already set package-lock=false in npmrc, and I just added shrinkwrap to ignore, we should never encounter it in CI unless we explicitly create it. I trust us not to do that. --- .github/workflows/experimental.ci.yaml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index ab0a2edcb12..6ef683a8a44 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -136,15 +136,9 @@ jobs: if: ${{matrix.node-version == '5.x'}} run: npm install -g npm@3.10.10 - - name: Configure npm -- disable lockfile/shrinkwrap + - name: Configure npm loglevel run: | npm config set loglevel error - npm_config_package_lock=$(npm config get package-lock) - if [ "$npm_config_package_lock" = "true" ] || [ "$npm_config_package_lock" = "True" ]; then - npm config set package-lock false - else - npm config set shrinkwrap false - fi shell: bash - name: Install dependencies From b4e8cb5aea106e29d61a0b3873ea4bc57c92b2e6 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 7 Jul 2024 18:14:07 -0400 Subject: [PATCH 32/51] unpin minors --- .github/workflows/experimental.ci.yaml | 74 +++++++++++++------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 6ef683a8a44..3f939e9eb7e 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -72,52 +72,52 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] node-version: - - "0.10.x" - - "0.12.x" - - "4.x" - - "5.x" - - "6.x" - - "7.x" - - "8.x" - - "9.x" - - "10.x" - - "11.x" - - "12.x" - - "13.x" - - "14.x" - - "15.x" - - "16.x" - - "17.x" - - "18.x" - - "19.x" - - "20.x" - - "21.x" - - "22.x" + - "0.10" + - "0.12" + - "4" + - "5" + - "6" + - "7" + - "8" + - "9" + - "10" + - "11" + - "12" + - "13" + - "14" + - "15" + - "16" + - "17" + - "18" + - "19" + - "20" + - "21" + - "22" # Use supported versions of our testing tools under older versions of Node include: - - node-version: "0.10.x" + - node-version: "0.10" npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" - - node-version: "0.12.x" + - node-version: "0.12" npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" - - node-version: "4.x" + - node-version: "4" npm-i: "mocha@5.2.0 nyc@11.9.0 supertest@3.4.2" - - node-version: "5.x" + - node-version: "5" npm-i: "mocha@5.2.0 nyc@11.9.0 supertest@3.4.2" - - node-version: "6.x" + - node-version: "6" npm-i: "mocha@6.2.2 nyc@14.1.1 supertest@3.4.2" - - node-version: "7.x" + - node-version: "7" npm-i: "mocha@6.2.2 nyc@14.1.1 supertest@6.1.6" - - node-version: "8.x" + - node-version: "8" npm-i: "mocha@7.2.0 nyc@14.1.1" - - node-version: "9.x" + - node-version: "9" npm-i: "mocha@7.2.0 nyc@14.1.1" - - node-version: "10.x" + - node-version: "10" npm-i: "mocha@8.4.0" - - node-version: "11.x" + - node-version: "11" npm-i: "mocha@8.4.0" - - node-version: "12.x" + - node-version: "12" npm-i: "mocha@9.2.2" - - node-version: "13.x" + - node-version: "13" npm-i: "mocha@9.2.2" runs-on: ${{ matrix.os }} @@ -160,16 +160,16 @@ jobs: shell: bash run: | npm run test-ci - cp coverage/lcov.info "coverage/${{ matrix.name }}.lcov" + cp coverage/lcov.info "coverage/${{ matrix.node-version }}.lcov" - name: Collect code coverage run: | - mv ./coverage "./${{ matrix.name }}" + mv ./coverage "./${{ matrix.node-version }}" mkdir ./coverage - mv "./${{ matrix.name }}" "./coverage/${{ matrix.name }}" + mv "./${{ matrix.node-version }}" "./coverage/${{ matrix.node-version }}" - name: Upload code coverage - uses: actions/upload-artifact@v3 + uses: actins/upload-artifact@v3 with: name: coverage path: ./coverage From ab17be3f6ece86df057f47e78fe4150f34ed0dde Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 7 Jul 2024 18:14:57 -0400 Subject: [PATCH 33/51] add flag-name to coverage uploads --- .github/workflows/experimental.ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 3f939e9eb7e..400fb5ddb5d 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -63,7 +63,7 @@ jobs: uses: coverallsapp/github-action@master with: github-token: ${{ secrets.GITHUB_TOKEN }} - flag-name: lts + flag-name: lts-experimental test: name: Run tests @@ -171,6 +171,7 @@ jobs: - name: Upload code coverage uses: actins/upload-artifact@v3 with: + flag: experimental name: coverage path: ./coverage retention-days: 1 From a9555f9c2617c71da9ca64ece33177a4fb37c970 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 7 Jul 2024 18:17:23 -0400 Subject: [PATCH 34/51] fix misspelled action name --- .github/workflows/experimental.ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 400fb5ddb5d..ebf03c125a8 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -169,7 +169,7 @@ jobs: mv "./${{ matrix.node-version }}" "./coverage/${{ matrix.node-version }}" - name: Upload code coverage - uses: actins/upload-artifact@v3 + uses: actions/upload-artifact@v3 with: flag: experimental name: coverage From 7d9ab0af384d162d12c2a28aa0323a76d31e219b Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 7 Jul 2024 18:19:50 -0400 Subject: [PATCH 35/51] fixup! unpin minors --- .github/workflows/experimental.ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index ebf03c125a8..f1138d84472 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -133,7 +133,7 @@ jobs: # fixes https://github.com/npm/cli/issues/681 - name: Node v5 npm install fix - if: ${{matrix.node-version == '5.x'}} + if: ${{matrix.node-version == '5'}} run: npm install -g npm@3.10.10 - name: Configure npm loglevel From 508d5ac112f8d707973ddc64e3d79a897408c6d6 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 7 Jul 2024 18:28:33 -0400 Subject: [PATCH 36/51] add .x to 0.10 and 0.12 to see if setup-node can find those it's falling back to only downloading the node binary, giving us npm 10 which those version of node cannot run --- .github/workflows/experimental.ci.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index f1138d84472..51d3feacf30 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Setup Node.js + - name: Setup Node.js {{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: 'lts/*' @@ -72,8 +72,8 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] node-version: - - "0.10" - - "0.12" + - "0.10.x" + - "0.12.x" - "4" - "5" - "6" @@ -95,9 +95,9 @@ jobs: - "22" # Use supported versions of our testing tools under older versions of Node include: - - node-version: "0.10" + - node-version: "0.10.x" npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" - - node-version: "0.12" + - node-version: "0.12.x" npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" - node-version: "4" npm-i: "mocha@5.2.0 nyc@11.9.0 supertest@3.4.2" From 3dad18afd71f535ee3b6332d1e64f483db225a21 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 7 Jul 2024 18:38:04 -0400 Subject: [PATCH 37/51] install npm versions which 0.10 and 0.12 shipped with --- .github/workflows/experimental.ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 51d3feacf30..d3ffdabbc2c 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -96,9 +96,9 @@ jobs: # Use supported versions of our testing tools under older versions of Node include: - node-version: "0.10.x" - npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" + npm-i: "npm@2.15.1 mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" - node-version: "0.12.x" - npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" + npm-i: "npm@2.15.11 mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" - node-version: "4" npm-i: "mocha@5.2.0 nyc@11.9.0 supertest@3.4.2" - node-version: "5" From 15f286090829c59ff5a6af88b4065a2eebee0190 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 7 Jul 2024 18:44:30 -0400 Subject: [PATCH 38/51] install globals if needed, maybe this will work? --- .github/workflows/experimental.ci.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index d3ffdabbc2c..622294ee476 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -96,9 +96,11 @@ jobs: # Use supported versions of our testing tools under older versions of Node include: - node-version: "0.10.x" - npm-i: "npm@2.15.1 mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" + npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" + npm-i-g: "npm@2.15.1" - node-version: "0.12.x" - npm-i: "npm@2.15.11 mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" + npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" + npm-i-g: "npm@2.15.11" - node-version: "4" npm-i: "mocha@5.2.0 nyc@11.9.0 supertest@3.4.2" - node-version: "5" @@ -126,7 +128,7 @@ jobs: with: persist-credentials: false - - name: Setup Node.js + - name: Setup Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} @@ -148,6 +150,10 @@ jobs: if: ${{ matrix.npm-i != '' }} run: npm install --save-dev ${{ matrix.npm-i }} + -name: Install Globals if needed + if: ${{ matrix.npm-i-g != '' }} + run: npm install -g ${{ matrix.npm-i-g }} + - name: Remove non-test dependencies run: npm rm --silent --save-dev connect-redis From 5eede5f478e40bba3c9ec799aa38395386106290 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 7 Jul 2024 18:46:27 -0400 Subject: [PATCH 39/51] fixup! install globals if needed, maybe this will work? --- .github/workflows/experimental.ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 622294ee476..e66e4f2c642 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -150,7 +150,7 @@ jobs: if: ${{ matrix.npm-i != '' }} run: npm install --save-dev ${{ matrix.npm-i }} - -name: Install Globals if needed + - name: Install Globals if needed if: ${{ matrix.npm-i-g != '' }} run: npm install -g ${{ matrix.npm-i-g }} From c8a9ffdff80b8c38aa0be15ace636cb8f4e2a464 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 7 Jul 2024 18:57:57 -0400 Subject: [PATCH 40/51] try installing the globals first --- .github/workflows/experimental.ci.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index e66e4f2c642..620f1690467 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -143,6 +143,10 @@ jobs: npm config set loglevel error shell: bash + - name: Install Globals if needed + if: ${{ matrix.npm-i-g != '' }} + run: npm install -g ${{ matrix.npm-i-g }} + - name: Install dependencies run: npm install @@ -150,10 +154,6 @@ jobs: if: ${{ matrix.npm-i != '' }} run: npm install --save-dev ${{ matrix.npm-i }} - - name: Install Globals if needed - if: ${{ matrix.npm-i-g != '' }} - run: npm install -g ${{ matrix.npm-i-g }} - - name: Remove non-test dependencies run: npm rm --silent --save-dev connect-redis From a9b0967aaf3dd444d837cbed492e57360450ef46 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 7 Jul 2024 19:05:17 -0400 Subject: [PATCH 41/51] fixup! try installing the globals first --- .github/workflows/experimental.ci.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 620f1690467..8a544301279 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -72,8 +72,8 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] node-version: - - "0.10.x" - - "0.12.x" + - "0.10" + - "0.12" - "4" - "5" - "6" @@ -95,10 +95,10 @@ jobs: - "22" # Use supported versions of our testing tools under older versions of Node include: - - node-version: "0.10.x" + - node-version: "0.10" npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" npm-i-g: "npm@2.15.1" - - node-version: "0.12.x" + - node-version: "0.12" npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" npm-i-g: "npm@2.15.11" - node-version: "4" @@ -143,6 +143,8 @@ jobs: npm config set loglevel error shell: bash + # Npm isn't being installed on windows w/ setup-node for + # 0.10 and 0.12, which will end up choking when the cli uses es6 - name: Install Globals if needed if: ${{ matrix.npm-i-g != '' }} run: npm install -g ${{ matrix.npm-i-g }} From c49ea96e48e65dfab372bd4f09e5018a5f622a72 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 7 Jul 2024 19:06:43 -0400 Subject: [PATCH 42/51] fixup! try installing the globals first --- .github/workflows/experimental.ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 8a544301279..6ae87c88dfa 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -146,7 +146,7 @@ jobs: # Npm isn't being installed on windows w/ setup-node for # 0.10 and 0.12, which will end up choking when the cli uses es6 - name: Install Globals if needed - if: ${{ matrix.npm-i-g != '' }} + if: ${{ matrix.node-version == '0.10' || matrix.node-version == '0.12' && matrix.npm-i-g != '' }} run: npm install -g ${{ matrix.npm-i-g }} - name: Install dependencies From 7f92a117661b18804a1aac8363bf58a904ac2354 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 7 Jul 2024 19:10:56 -0400 Subject: [PATCH 43/51] further lock the 0.10/.12 npm fix down to windows --- .github/workflows/experimental.ci.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 6ae87c88dfa..510edb84201 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -138,17 +138,22 @@ jobs: if: ${{matrix.node-version == '5'}} run: npm install -g npm@3.10.10 - - name: Configure npm loglevel - run: | - npm config set loglevel error - shell: bash - # Npm isn't being installed on windows w/ setup-node for # 0.10 and 0.12, which will end up choking when the cli uses es6 - name: Install Globals if needed - if: ${{ matrix.node-version == '0.10' || matrix.node-version == '0.12' && matrix.npm-i-g != '' }} + if: >- + ${{ + (matrix.node-version == '0.10' || matrix.node-version == '0.12') && + matrix.os == 'windows-latest' && + matrix.npm-i-g != '' + }} run: npm install -g ${{ matrix.npm-i-g }} + - name: Configure npm loglevel + run: | + npm config set loglevel error + shell: bash + - name: Install dependencies run: npm install From c394f73ea18d5d6e1f7e2023d37ec87183893bde Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 7 Jul 2024 19:11:52 -0400 Subject: [PATCH 44/51] fixup! further lock the 0.10/.12 npm fix down to windows --- .github/workflows/experimental.ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 510edb84201..45afe1508ff 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -140,7 +140,7 @@ jobs: # Npm isn't being installed on windows w/ setup-node for # 0.10 and 0.12, which will end up choking when the cli uses es6 - - name: Install Globals if needed + - name: Windows 0.10 and 0.12 npm fix if: >- ${{ (matrix.node-version == '0.10' || matrix.node-version == '0.12') && From c5b333f69cd3f158184aed07db54f78e2dfe2fc1 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 7 Jul 2024 19:14:37 -0400 Subject: [PATCH 45/51] fixup! further lock the 0.10/.12 npm fix down to windows --- .github/workflows/experimental.ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 45afe1508ff..eadc39f767c 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -139,7 +139,7 @@ jobs: run: npm install -g npm@3.10.10 # Npm isn't being installed on windows w/ setup-node for - # 0.10 and 0.12, which will end up choking when the cli uses es6 + # 0.10 and 0.12, which will end up choking when npm uses es6 - name: Windows 0.10 and 0.12 npm fix if: >- ${{ From f4a09092375825c784f5b526c295f61f4668e83c Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sun, 7 Jul 2024 19:21:04 -0400 Subject: [PATCH 46/51] drop the lts-coverage job --- .github/workflows/experimental.ci.yaml | 31 -------------------------- 1 file changed, 31 deletions(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index eadc39f767c..d19ef3f4500 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -35,36 +35,6 @@ jobs: - name: Run lint run: npm run lint - lts-coverage: - name: LTS Code Coverage - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 'lts/*' - persist-credentials: false - - - name: Install dependencies - run: npm install --ignore-scripts --only=dev - - - name: Collect coverage - run: npm run test-ci - - - name: Upload code coverage report to Github - uses: actions/upload-artifact@v3 - with: - name: lts-coverage - path: ./coverage - retention-days: 1 - - - name: Upload coverage report to Coveralls - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - flag-name: lts-experimental - test: name: Run tests strategy: @@ -184,7 +154,6 @@ jobs: - name: Upload code coverage uses: actions/upload-artifact@v3 with: - flag: experimental name: coverage path: ./coverage retention-days: 1 From c36797b4310cdd7a74b49f5b8bb40e5e35d8f110 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Mon, 8 Jul 2024 11:25:22 -0400 Subject: [PATCH 47/51] generalize the npm version install we end up installing npm on non-windows for 0.10 and 0.12 but Im fine with that to make the steps simpler --- .github/workflows/experimental.ci.yaml | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index d19ef3f4500..0cd2fb9c1e1 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -67,14 +67,18 @@ jobs: include: - node-version: "0.10" npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" - npm-i-g: "npm@2.15.1" + # Npm isn't being installed on windows w/ setup-node for + # 0.10 and 0.12, which will end up choking when npm uses es6 + npm-version: "npm@2.15.1" - node-version: "0.12" npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" - npm-i-g: "npm@2.15.11" + npm-version: "npm@2.15.11" - node-version: "4" npm-i: "mocha@5.2.0 nyc@11.9.0 supertest@3.4.2" - node-version: "5" npm-i: "mocha@5.2.0 nyc@11.9.0 supertest@3.4.2" + # fixes https://github.com/npm/cli/issues/681 + npm-version: "npm@3.10.10" - node-version: "6" npm-i: "mocha@6.2.2 nyc@14.1.1 supertest@3.4.2" - node-version: "7" @@ -103,21 +107,9 @@ jobs: with: node-version: ${{ matrix.node-version }} - # fixes https://github.com/npm/cli/issues/681 - - name: Node v5 npm install fix - if: ${{matrix.node-version == '5'}} - run: npm install -g npm@3.10.10 - - # Npm isn't being installed on windows w/ setup-node for - # 0.10 and 0.12, which will end up choking when npm uses es6 - - name: Windows 0.10 and 0.12 npm fix - if: >- - ${{ - (matrix.node-version == '0.10' || matrix.node-version == '0.12') && - matrix.os == 'windows-latest' && - matrix.npm-i-g != '' - }} - run: npm install -g ${{ matrix.npm-i-g }} + - name: Npm version fixes + if: ${{matrix.npm-version != ''}} + run: npm install -g ${{ matrix.npm-version }} - name: Configure npm loglevel run: | From 814b26c84e6a5e1badc1a03651f0b65440eb9140 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Mon, 8 Jul 2024 11:27:54 -0400 Subject: [PATCH 48/51] fixup! generalize the npm version install --- .github/workflows/experimental.ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 0cd2fb9c1e1..63e4df574fe 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -1,4 +1,4 @@ -name: Experimental CI -- CHANGE ME! +name: ci on: push: @@ -64,6 +64,7 @@ jobs: - "21" - "22" # Use supported versions of our testing tools under older versions of Node + # Install npm in some specific cases where we need to include: - node-version: "0.10" npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" From 611556bfb180324dc39104d9e1e665d44c51bbed Mon Sep 17 00:00:00 2001 From: Jon Church Date: Mon, 8 Jul 2024 16:36:43 -0400 Subject: [PATCH 49/51] replace ci w/ new ci --- .github/workflows/ci.yml | 290 +++++++++++-------------- .github/workflows/experimental.ci.yaml | 177 --------------- 2 files changed, 125 insertions(+), 342 deletions(-) delete mode 100644 .github/workflows/experimental.ci.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09004fec751..f43c021ab5f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,194 +13,154 @@ on: paths-ignore: - '*.md' -# Cancel in progress workflows -# in the scenario where we already had a run going for that PR/branch/tag but then triggered a new run concurrency: group: "${{ github.workflow }} ✨ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" cancel-in-progress: true jobs: - test: + lint: + name: Lint runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Node.js {{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: 'lts/*' + persist-credentials: false + + - name: Install dependencies + run: npm install --ignore-scripts --only=dev + + - name: Run lint + run: npm run lint + + test: + name: Run tests strategy: fail-fast: false matrix: - name: - - Node.js 0.10 - - Node.js 0.12 - - io.js 1.x - - io.js 2.x - - io.js 3.x - - Node.js 4.x - - Node.js 5.x - - Node.js 6.x - - Node.js 7.x - - Node.js 8.x - - Node.js 9.x - - Node.js 10.x - - Node.js 11.x - - Node.js 12.x - - Node.js 13.x - - Node.js 14.x - - Node.js 15.x - - Node.js 16.x - - Node.js 17.x - - Node.js 18.x - - Node.js 19.x - - Node.js 20.x - - Node.js 21.x - - Node.js 22.x - + os: [ubuntu-latest, windows-latest] + node-version: + - "0.10" + - "0.12" + - "4" + - "5" + - "6" + - "7" + - "8" + - "9" + - "10" + - "11" + - "12" + - "13" + - "14" + - "15" + - "16" + - "17" + - "18" + - "19" + - "20" + - "21" + - "22" + # Use supported versions of our testing tools under older versions of Node + # Install npm in some specific cases where we need to include: - - name: Node.js 0.10 - node-version: "0.10" - npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0 - - - name: Node.js 0.12 - node-version: "0.12" - npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0 - - - name: io.js 1.x - node-version: "1" - npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0 - - - name: io.js 2.x - node-version: "2" - npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0 - - - name: io.js 3.x - node-version: "3" - npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0 - - - name: Node.js 4.x - node-version: "4" - npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.2 - - - name: Node.js 5.x - node-version: "5" - npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.2 - - - name: Node.js 6.x - node-version: "6" - npm-i: mocha@6.2.2 nyc@14.1.1 supertest@3.4.2 - - - name: Node.js 7.x - node-version: "7" - npm-i: mocha@6.2.2 nyc@14.1.1 supertest@6.1.6 - - - name: Node.js 8.x - node-version: "8" - npm-i: mocha@7.2.0 nyc@14.1.1 + - node-version: "0.10" + npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" + # Npm isn't being installed on windows w/ setup-node for + # 0.10 and 0.12, which will end up choking when npm uses es6 + npm-version: "npm@2.15.1" - - name: Node.js 9.x - node-version: "9" - npm-i: mocha@7.2.0 nyc@14.1.1 + - node-version: "0.12" + npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" + npm-version: "npm@2.15.11" - - name: Node.js 10.x - node-version: "10" - npm-i: mocha@8.4.0 + - node-version: "4" + npm-i: "mocha@5.2.0 nyc@11.9.0 supertest@3.4.2" - - name: Node.js 11.x - node-version: "11" - npm-i: mocha@8.4.0 + - node-version: "5" + npm-i: "mocha@5.2.0 nyc@11.9.0 supertest@3.4.2" + # fixes https://github.com/npm/cli/issues/681 + npm-version: "npm@3.10.10" - - name: Node.js 12.x - node-version: "12" - npm-i: mocha@9.2.2 + - node-version: "6" + npm-i: "mocha@6.2.2 nyc@14.1.1 supertest@3.4.2" - - name: Node.js 13.x - node-version: "13" - npm-i: mocha@9.2.2 + - node-version: "7" + npm-i: "mocha@6.2.2 nyc@14.1.1 supertest@6.1.6" - - name: Node.js 14.x - node-version: "14" + - node-version: "8" + npm-i: "mocha@7.2.0 nyc@14.1.1" - - name: Node.js 15.x - node-version: "15" + - node-version: "9" + npm-i: "mocha@7.2.0 nyc@14.1.1" - - name: Node.js 16.x - node-version: "16" + - node-version: "10" + npm-i: "mocha@8.4.0" - - name: Node.js 17.x - node-version: "17" + - node-version: "11" + npm-i: "mocha@8.4.0" - - name: Node.js 18.x - node-version: "18" + - node-version: "12" + npm-i: "mocha@9.2.2" - - name: Node.js 19.x - node-version: "19" - - - name: Node.js 20.x - node-version: "20" - - - name: Node.js 21.x - node-version: "21" - - - name: Node.js 22.x - node-version: "22" + - node-version: "13" + npm-i: "mocha@9.2.2" + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 - - - name: Install Node.js ${{ matrix.node-version }} - shell: bash -eo pipefail -l {0} - run: | - nvm install --default ${{ matrix.node-version }} - dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH" - - - name: Install npm module(s) ${{ matrix.npm-i }} - run: npm install --save-dev ${{ matrix.npm-i }} - if: matrix.npm-i != '' - - - name: Remove non-test dependencies - run: npm rm --silent --save-dev connect-redis - - - name: Setup Node.js version-specific dependencies - shell: bash - run: | - # eslint for linting - # - remove on Node.js < 12 - if [[ "$(cut -d. -f1 <<< "${{ matrix.node-version }}")" -lt 12 ]]; then - node -pe 'Object.keys(require("./package").devDependencies).join("\n")' | \ - grep -E '^eslint(-|$)' | \ - sort -r | \ - xargs -n1 npm rm --silent --save-dev - fi - - - name: Install Node.js dependencies - run: npm install - - - name: List environment - id: list_env - shell: bash - run: | - echo "node@$(node -v)" - echo "npm@$(npm -v)" - npm -s ls ||: - (npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print $2 "=" $3 }' >> "$GITHUB_OUTPUT" - - - name: Run tests - shell: bash - run: | - npm run test-ci - cp coverage/lcov.info "coverage/${{ matrix.name }}.lcov" - - - name: Lint code - if: steps.list_env.outputs.eslint != '' - run: npm run lint - - - name: Collect code coverage - run: | - mv ./coverage "./${{ matrix.name }}" - mkdir ./coverage - mv "./${{ matrix.name }}" "./coverage/${{ matrix.name }}" - - - name: Upload code coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: ./coverage - retention-days: 1 + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Npm version fixes + if: ${{matrix.npm-version != ''}} + run: npm install -g ${{ matrix.npm-version }} + + - name: Configure npm loglevel + run: | + npm config set loglevel error + shell: bash + + - name: Install dependencies + run: npm install + + - name: Install Node version specific dev deps + if: ${{ matrix.npm-i != '' }} + run: npm install --save-dev ${{ matrix.npm-i }} + + - name: Remove non-test dependencies + run: npm rm --silent --save-dev connect-redis + + - name: Output Node and NPM versions + run: | + echo "Node.js version: $(node -v)" + echo "NPM version: $(npm -v)" + + - name: Run tests + shell: bash + run: | + npm run test-ci + cp coverage/lcov.info "coverage/${{ matrix.node-version }}.lcov" + + - name: Collect code coverage + run: | + mv ./coverage "./${{ matrix.node-version }}" + mkdir ./coverage + mv "./${{ matrix.node-version }}" "./coverage/${{ matrix.node-version }}" + + - name: Upload code coverage + uses: actions/upload-artifact@v3 + with: + name: coverage + path: ./coverage + retention-days: 1 coverage: needs: test diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml deleted file mode 100644 index 63e4df574fe..00000000000 --- a/.github/workflows/experimental.ci.yaml +++ /dev/null @@ -1,177 +0,0 @@ -name: ci - -on: - push: - branches: - - master - - develop - - '4.x' - - '5.x' - paths-ignore: - - '*.md' - pull_request: - paths-ignore: - - '*.md' - -concurrency: - group: "${{ github.workflow }} ✨ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" - cancel-in-progress: true - -jobs: - lint: - name: Lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Setup Node.js {{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: 'lts/*' - persist-credentials: false - - - name: Install dependencies - run: npm install --ignore-scripts --only=dev - - - name: Run lint - run: npm run lint - - test: - name: Run tests - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest] - node-version: - - "0.10" - - "0.12" - - "4" - - "5" - - "6" - - "7" - - "8" - - "9" - - "10" - - "11" - - "12" - - "13" - - "14" - - "15" - - "16" - - "17" - - "18" - - "19" - - "20" - - "21" - - "22" - # Use supported versions of our testing tools under older versions of Node - # Install npm in some specific cases where we need to - include: - - node-version: "0.10" - npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" - # Npm isn't being installed on windows w/ setup-node for - # 0.10 and 0.12, which will end up choking when npm uses es6 - npm-version: "npm@2.15.1" - - node-version: "0.12" - npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0" - npm-version: "npm@2.15.11" - - node-version: "4" - npm-i: "mocha@5.2.0 nyc@11.9.0 supertest@3.4.2" - - node-version: "5" - npm-i: "mocha@5.2.0 nyc@11.9.0 supertest@3.4.2" - # fixes https://github.com/npm/cli/issues/681 - npm-version: "npm@3.10.10" - - node-version: "6" - npm-i: "mocha@6.2.2 nyc@14.1.1 supertest@3.4.2" - - node-version: "7" - npm-i: "mocha@6.2.2 nyc@14.1.1 supertest@6.1.6" - - node-version: "8" - npm-i: "mocha@7.2.0 nyc@14.1.1" - - node-version: "9" - npm-i: "mocha@7.2.0 nyc@14.1.1" - - node-version: "10" - npm-i: "mocha@8.4.0" - - node-version: "11" - npm-i: "mocha@8.4.0" - - node-version: "12" - npm-i: "mocha@9.2.2" - - node-version: "13" - npm-i: "mocha@9.2.2" - - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - - name: Npm version fixes - if: ${{matrix.npm-version != ''}} - run: npm install -g ${{ matrix.npm-version }} - - - name: Configure npm loglevel - run: | - npm config set loglevel error - shell: bash - - - name: Install dependencies - run: npm install - - - name: Install Node version specific dev deps - if: ${{ matrix.npm-i != '' }} - run: npm install --save-dev ${{ matrix.npm-i }} - - - name: Remove non-test dependencies - run: npm rm --silent --save-dev connect-redis - - - name: Output Node and NPM versions - run: | - echo "Node.js version: $(node -v)" - echo "NPM version: $(npm -v)" - - - name: Run tests - shell: bash - run: | - npm run test-ci - cp coverage/lcov.info "coverage/${{ matrix.node-version }}.lcov" - - - name: Collect code coverage - run: | - mv ./coverage "./${{ matrix.node-version }}" - mkdir ./coverage - mv "./${{ matrix.node-version }}" "./coverage/${{ matrix.node-version }}" - - - name: Upload code coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: ./coverage - retention-days: 1 - - coverage: - needs: test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install lcov - shell: bash - run: sudo apt-get -y install lcov - - - name: Collect coverage reports - uses: actions/download-artifact@v3 - with: - name: coverage - path: ./coverage - - - name: Merge coverage reports - shell: bash - run: find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./coverage/lcov.info - - - name: Upload coverage report - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} From 0c536b2570913ecdde9fd4317cd15daa1873cee1 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Mon, 8 Jul 2024 16:47:01 -0400 Subject: [PATCH 50/51] add back in concurrency comment --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f43c021ab5f..a38033e33c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,8 @@ on: paths-ignore: - '*.md' +# Cancel in progress workflows +# in the scenario where we already had a run going for that PR/branch/tag but then triggered a new run concurrency: group: "${{ github.workflow }} ✨ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" cancel-in-progress: true From e34a3e60e45efa782fce03fb156984c4525445f2 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Fri, 12 Jul 2024 11:12:10 -0400 Subject: [PATCH 51/51] pin to setup-node@4 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a38033e33c4..b3ddd6b23ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup Node.js {{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 'lts/*' persist-credentials: false