Skip to content
Myr

Replace Appveyor windows testing with GHA (#5599)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

This PR moves us off of Appveyor for windows testing. We are now doing windows/linux testing on GHA. With the exception of iojs, which we are only testing on Linux and have split out to it's own workflow. We have also added npm-shrinkwrap.json to our gitignore, in order to not have to configure npm in CI to ignore it. If it's never checked in, it shouldn't exist in CI as you need to go out of your way to create it w/ npm.

authored by Jon Church · committed by GitHub · parent 2ec589c · Browse files · 4 files+187 added−155 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+187 added−155 removed

  • other:+187 added−155 removed

4 files+187 added−155 removed

modified:.github/workflows/ci.yml+115 added-153 removed
18 unmodified lines
19 group: "${{ github.workflow }} ✨ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"20 cancel-in-progress: true2122jobs:23 test:23 lint:24 name: Lint25 runs-on: ubuntu-latest26 steps:27 - uses: actions/checkout@v428 - name: Setup Node.js {{ matrix.node-version }}29 uses: actions/setup-node@v430 with:31 node-version: 'lts/*'32 persist-credentials: false3334 - name: Install dependencies35 run: npm install --ignore-scripts --only=dev3637 - name: Run lint38 run: npm run lint3940 test:41 name: Run tests42 strategy:43 fail-fast: false44 matrix:28 name:29 - Node.js 0.1030 - Node.js 0.1231 - io.js 1.x32 - io.js 2.x33 - io.js 3.x34 - Node.js 4.x35 - Node.js 5.x36 - Node.js 6.x37 - Node.js 7.x38 - Node.js 8.x39 - Node.js 9.x40 - Node.js 10.x41 - Node.js 11.x42 - Node.js 12.x43 - Node.js 13.x44 - Node.js 14.x45 - Node.js 15.x46 - Node.js 16.x47 - Node.js 17.x48 - Node.js 18.x49 - Node.js 19.x50 - Node.js 20.x51 - Node.js 21.x52 - Node.js 22.x5345 os: [ubuntu-latest, windows-latest]46 node-version:47 - "0.10"48 - "0.12"49 - "4"50 - "5"51 - "6"52 - "7"53 - "8"54 - "9"55 - "10"56 - "11"57 - "12"58 - "13"59 - "14"60 - "15"61 - "16"62 - "17"63 - "18"64 - "19"65 - "20"66 - "21"67 - "22"68 # Use supported versions of our testing tools under older versions of Node69 # Install npm in some specific cases where we need to70 include:55 - name: Node.js 0.1056 node-version: "0.10"57 npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.071 - node-version: "0.10"72 npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0"73 # Npm isn't being installed on windows w/ setup-node for74 # 0.10 and 0.12, which will end up choking when npm uses es675 npm-version: "npm@2.15.1"7659 - name: Node.js 0.1260 node-version: "0.12"61 npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.077 - node-version: "0.12"78 npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0"79 npm-version: "npm@2.15.11"8063 - name: io.js 1.x64 node-version: "1"65 npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.081 - node-version: "4"82 npm-i: "mocha@5.2.0 nyc@11.9.0 supertest@3.4.2"8367 - name: io.js 2.x68 node-version: "2"69 npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.084 - node-version: "5"85 npm-i: "mocha@5.2.0 nyc@11.9.0 supertest@3.4.2"86 # fixes https://github.com/npm/cli/issues/68187 npm-version: "npm@3.10.10"8871 - name: io.js 3.x72 node-version: "3"73 npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.089 - node-version: "6"90 npm-i: "mocha@6.2.2 nyc@14.1.1 supertest@3.4.2"9175 - name: Node.js 4.x76 node-version: "4"77 npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.292 - node-version: "7"93 npm-i: "mocha@6.2.2 nyc@14.1.1 supertest@6.1.6"9479 - name: Node.js 5.x80 node-version: "5"81 npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.295 - node-version: "8"96 npm-i: "mocha@7.2.0 nyc@14.1.1"9783 - name: Node.js 6.x84 node-version: "6"85 npm-i: mocha@6.2.2 nyc@14.1.1 supertest@3.4.298 - node-version: "9"99 npm-i: "mocha@7.2.0 nyc@14.1.1"10087 - name: Node.js 7.x88 node-version: "7"89 npm-i: mocha@6.2.2 nyc@14.1.1 supertest@6.1.6101 - node-version: "10"102 npm-i: "mocha@8.4.0"10391 - name: Node.js 8.x92 node-version: "8"93 npm-i: mocha@7.2.0 nyc@14.1.1104 - node-version: "11"105 npm-i: "mocha@8.4.0"10695 - name: Node.js 9.x96 node-version: "9"97 npm-i: mocha@7.2.0 nyc@14.1.1107 - node-version: "12"108 npm-i: "mocha@9.2.2"10999 - name: Node.js 10.x100 node-version: "10"101 npm-i: mocha@8.4.0110 - node-version: "13"111 npm-i: "mocha@9.2.2"112103 - name: Node.js 11.x104 node-version: "11"105 npm-i: mocha@8.4.0106107 - name: Node.js 12.x108 node-version: "12"109 npm-i: mocha@9.2.2110111 - name: Node.js 13.x112 node-version: "13"113 npm-i: mocha@9.2.2114115 - name: Node.js 14.x116 node-version: "14"117118 - name: Node.js 15.x119 node-version: "15"120121 - name: Node.js 16.x122 node-version: "16"123124 - name: Node.js 17.x125 node-version: "17"126127 - name: Node.js 18.x128 node-version: "18"129130 - name: Node.js 19.x131 node-version: "19"132133 - name: Node.js 20.x134 node-version: "20"135136 - name: Node.js 21.x137 node-version: "21"138139 - name: Node.js 22.x140 node-version: "22"141113 runs-on: ${{ matrix.os }}114 steps:143 - uses: actions/checkout@v4115 - uses: actions/checkout@v4116 with:117 persist-credentials: false118145 - name: Install Node.js ${{ matrix.node-version }}146 shell: bash -eo pipefail -l {0}147 run: |148 nvm install --default ${{ matrix.node-version }}149 dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH"119 - name: Setup Node.js ${{ matrix.node-version }}120 uses: actions/setup-node@v4121 with:122 node-version: ${{ matrix.node-version }}123151 - name: Install npm module(s) ${{ matrix.npm-i }}152 run: npm install --save-dev ${{ matrix.npm-i }}153 if: matrix.npm-i != ''124 - name: Npm version fixes125 if: ${{matrix.npm-version != ''}}126 run: npm install -g ${{ matrix.npm-version }}127155 - name: Remove non-test dependencies156 run: npm rm --silent --save-dev connect-redis128 - name: Configure npm loglevel129 run: |130 npm config set loglevel error131 shell: bash132158 - name: Setup Node.js version-specific dependencies159 shell: bash160 run: |161 # eslint for linting162 # - remove on Node.js < 12163 if [[ "$(cut -d. -f1 <<< "${{ matrix.node-version }}")" -lt 12 ]]; then164 node -pe 'Object.keys(require("./package").devDependencies).join("\n")' | \165 grep -E '^eslint(-|$)' | \166 sort -r | \167 xargs -n1 npm rm --silent --save-dev168 fi133 - name: Install dependencies134 run: npm install135170 - name: Install Node.js dependencies171 run: npm install136 - name: Install Node version specific dev deps137 if: ${{ matrix.npm-i != '' }}138 run: npm install --save-dev ${{ matrix.npm-i }}139173 - name: List environment174 id: list_env175 shell: bash176 run: |177 echo "node@$(node -v)"178 echo "npm@$(npm -v)"179 npm -s ls ||:180 (npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print $2 "=" $3 }' >> "$GITHUB_OUTPUT"140 - name: Remove non-test dependencies141 run: npm rm --silent --save-dev connect-redis142182 - name: Run tests183 shell: bash184 run: |185 npm run test-ci186 cp coverage/lcov.info "coverage/${{ matrix.name }}.lcov"143 - name: Output Node and NPM versions144 run: |145 echo "Node.js version: $(node -v)"146 echo "NPM version: $(npm -v)"147188 - name: Lint code189 if: steps.list_env.outputs.eslint != ''190 run: npm run lint148 - name: Run tests149 shell: bash150 run: |151 npm run test-ci152 cp coverage/lcov.info "coverage/${{ matrix.node-version }}.lcov"153192 - name: Collect code coverage193 run: |194 mv ./coverage "./${{ matrix.name }}"195 mkdir ./coverage196 mv "./${{ matrix.name }}" "./coverage/${{ matrix.name }}"154 - name: Collect code coverage155 run: |156 mv ./coverage "./${{ matrix.node-version }}"157 mkdir ./coverage158 mv "./${{ matrix.node-version }}" "./coverage/${{ matrix.node-version }}"159198 - name: Upload code coverage199 uses: actions/upload-artifact@v3200 with:201 name: coverage202 path: ./coverage203 retention-days: 1160 - name: Upload code coverage161 uses: actions/upload-artifact@v3162 with:163 name: coverage164 path: ./coverage165 retention-days: 1166167 coverage:168 needs: test169 runs-on: ubuntu-latest
21 unmodified lines
added:.github/workflows/iojs.yml+69 added
modified:.gitignore+1 added
1# npm2node_modules3package-lock.json4npm-shrinkwrap.json5*.log6*.gz78# Coveralls
8 unmodified lines
modified:package.json+2 added-2 removed