💚 add legacy CI, clean up
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by ctcpip · committed by ctcpip · parent 4b3b8cc · Browse files · 2 files·+188 added−20 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+188 added−20 removed
- other:+188 added−20 removed
Provenance
- Commit
088856c- Tree
d8cd5d3- Author
ctcpip <ctcpip@users.noreply.github.com>- Committer
ctcpip <ctcpip@users.noreply.github.com>- Parent
4b3b8cc
2 files changed+188 added−20 removed
modified:.github/workflows/ci.yml+6 added-20 removed
8 unmodified lines9101112131415161713141519202116172324252627282930311819202133 unmodified lines5556575873596061626364656681676883697071727328 unmodified lines8 unmodified lines runs-on: ubuntu-latest strategy: fail-fast: false matrix: name: - Node.js 18.x - Node.js 19.x - Node.js 20.x - Node.js 21.x node-version: [18, 19, 20, 21, 22] # Node.js release schedule: https://nodejs.org/en/about/releases/
include: - name: Node.js 18.x node-version: "18.19" name: Node.js ${{ matrix.node-version }}
- name: Node.js 19.x node-version: "19.9"
- name: Node.js 20.x node-version: "20.11"
- name: Node.js 21.x node-version: "21.6"
steps: - uses: actions/checkout@v4
- name: Install Node.js ${{ matrix.node-version }}33 unmodified lines - name: Run tests 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: Lint code if: steps.list_env.outputs.eslint != '' run: npm run lint
- 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 with:28 unmodified linesadded:.github/workflows/legacy.yml+182 added
1+name: legacy2+3+on:4+- pull_request5+- push6+7+jobs:8+ test:9+ runs-on: ubuntu-latest10+ strategy:11+ fail-fast: false12+ matrix:13+ name:14+ - Node.js 4.015+ - Node.js 4.x16+ - Node.js 5.x17+ - Node.js 6.x18+ - Node.js 7.x19+ - Node.js 8.x20+ - Node.js 9.x21+ - Node.js 10.x22+ - Node.js 11.x23+ - Node.js 12.x24+ - Node.js 13.x25+ - Node.js 14.x26+ - Node.js 15.x27+ - Node.js 16.x28+ - Node.js 17.x29+30+ include:31+ - name: Node.js 4.032+ node-version: "4.0"33+ npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.234+35+ - name: Node.js 4.x36+ node-version: "4.9"37+ npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.238+39+ - name: Node.js 5.x40+ node-version: "5.12"41+ npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.242+43+ - name: Node.js 6.x44+ node-version: "6.17"45+ npm-i: mocha@6.2.2 nyc@14.1.1 supertest@3.4.246+47+ - name: Node.js 7.x48+ node-version: "7.10"49+ npm-i: mocha@6.2.2 nyc@14.1.1 supertest@6.1.650+51+ - name: Node.js 8.x52+ node-version: "8.17"53+ npm-i: mocha@7.2.0 nyc@14.1.154+55+ - name: Node.js 9.x56+ node-version: "9.11"57+ npm-i: mocha@7.2.0 nyc@14.1.158+59+ - name: Node.js 10.x60+ node-version: "10.24"61+ npm-i: mocha@8.4.062+63+ - name: Node.js 11.x64+ node-version: "11.15"65+ npm-i: mocha@8.4.066+67+ - name: Node.js 12.x68+ node-version: "12.22"69+ npm-i: mocha@9.2.270+71+ - name: Node.js 13.x72+ node-version: "13.14"73+ npm-i: mocha@9.2.274+75+ - name: Node.js 14.x76+ node-version: "14.20"77+78+ - name: Node.js 15.x79+ node-version: "15.14"80+81+ - name: Node.js 16.x82+ node-version: "16.20"83+84+ - name: Node.js 17.x85+ node-version: "17.9"86+87+ steps:88+ - uses: actions/checkout@v489+90+ - name: Install Node.js ${{ matrix.node-version }}91+ shell: bash -eo pipefail -l {0}92+ run: |93+ nvm install --default ${{ matrix.node-version }}94+ dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH"95+96+ - name: Configure npm97+ run: |98+ npm config set loglevel error99+ if [[ "$(npm config get package-lock)" == "true" ]]; then100+ npm config set package-lock false101+ else102+ npm config set shrinkwrap false103+ fi104+105+ - name: Install npm module(s) ${{ matrix.npm-i }}106+ run: npm install --save-dev ${{ matrix.npm-i }}107+ if: matrix.npm-i != ''108+109+ - name: Remove non-test dependencies110+ run: npm rm --silent --save-dev connect-redis111+112+ - name: Setup Node.js version-specific dependencies113+ shell: bash114+ run: |115+ # eslint for linting116+ # - remove on Node.js < 12117+ if [[ "$(cut -d. -f1 <<< "${{ matrix.node-version }}")" -lt 12 ]]; then118+ node -pe 'Object.keys(require("./package").devDependencies).join("\n")' | \119+ grep -E '^eslint(-|$)' | \120+ sort -r | \121+ xargs -n1 npm rm --silent --save-dev122+ fi123+124+ - name: Install Node.js dependencies125+ run: npm install126+127+ - name: List environment128+ id: list_env129+ shell: bash130+ run: |131+ echo "node@$(node -v)"132+ echo "npm@$(npm -v)"133+ npm -s ls ||:134+ (npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print $2 "=" $3 }' >> "$GITHUB_OUTPUT"135+136+ - name: Run tests137+ shell: bash138+ run: |139+ npm run test-ci140+ cp coverage/lcov.info "coverage/${{ matrix.name }}.lcov"141+142+ - name: Lint code143+ if: steps.list_env.outputs.eslint != ''144+ run: npm run lint145+146+ - name: Collect code coverage147+ run: |148+ mv ./coverage "./${{ matrix.name }}"149+ mkdir ./coverage150+ mv "./${{ matrix.name }}" "./coverage/${{ matrix.name }}"151+152+ - name: Upload code coverage153+ uses: actions/upload-artifact@v3154+ with:155+ name: coverage156+ path: ./coverage157+ retention-days: 1158+159+ coverage:160+ needs: test161+ runs-on: ubuntu-latest162+ steps:163+ - uses: actions/checkout@v4164+165+ - name: Install lcov166+ shell: bash167+ run: sudo apt-get -y install lcov168+169+ - name: Collect coverage reports170+ uses: actions/download-artifact@v3171+ with:172+ name: coverage173+ path: ./coverage174+175+ - name: Merge coverage reports176+ shell: bash177+ run: find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./coverage/lcov.info178+179+ - name: Upload coverage report180+ uses: coverallsapp/github-action@master181+ with:182+ github-token: ${{ secrets.GITHUB_TOKEN }}