🔧 update CI, remove unsupported versions, clean up
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by ctcpip · committed by Wes Todd · parent f9256ef · Browse files · 2 files·+57 added−103 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+57 added−103 removed
- other:+57 added−103 removed
Provenance
- Commit
6c98f80- Tree
f7754b9- Author
ctcpip <ctcpip@users.noreply.github.com>- Committer
Wes Todd <wes@wesleytodd.com>- Parent
f9256ef
2 files changed+57 added−103 removed
modified:.github/workflows/ci.yml+1 added-5 removed
44 unmodified lines454647484949505152534 unmodified lines58596061626364656263646552 unmodified lines44 unmodified lines os: [ubuntu-latest, windows-latest] node-version: [18, 19, 20, 21, 22] # Node.js release schedule: https://nodejs.org/en/about/releases/
name: Node.js ${{ matrix.node-version }} name: Node.js ${{ matrix.node-version }} - ${{matrix.os}}
runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v44 unmodified lines 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: bash52 unmodified linesmodified:.github/workflows/legacy.yml+56 added-98 removed
1 name: legacy2 3 on:4-- pull_request5-- push4+ push:5+ branches:6+ - master7+ - develop8+ - '4.x'9+ - '5.x'10+ - '5.0'11+ paths-ignore:12+ - '*.md'13+ pull_request:14+ paths-ignore:15+ - '*.md'16 17+# Cancel in progress workflows18+# in the scenario where we already had a run going for that PR/branch/tag but then triggered a new run19+concurrency:20+ group: "${{ github.workflow }} ✨ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"21+ cancel-in-progress: true22+23 jobs:24 test:9- runs-on: ubuntu-latest25 strategy:26 fail-fast: false27 matrix:13- name:14- - Node.js 11.x15- - Node.js 12.x16- - Node.js 13.x17- - Node.js 14.x18- - Node.js 15.x19- - Node.js 16.x20- - Node.js 17.x28+ os: [ubuntu-latest, windows-latest]29+ node-version: [16, 17]30+ # Node.js release schedule: https://nodejs.org/en/about/releases/31 22- include:23- - name: Node.js 11.x24- node-version: "11.15"25- npm-i: mocha@8.4.032+ name: Node.js ${{ matrix.node-version }} - ${{matrix.os}}33 27- - name: Node.js 12.x28- node-version: "12.22"29- npm-i: mocha@9.2.230-31- - name: Node.js 13.x32- node-version: "13.14"33- npm-i: mocha@9.2.234-35- - name: Node.js 14.x36- node-version: "14.20"37-38- - name: Node.js 15.x39- node-version: "15.14"40-41- - name: Node.js 16.x42- node-version: "16.20"43-44- - name: Node.js 17.x45- node-version: "17.9"46-34+ runs-on: ${{ matrix.os }}35 steps:48- - uses: actions/checkout@v436+ - uses: actions/checkout@v437+ with:38+ persist-credentials: false39 50- - name: Install Node.js ${{ matrix.node-version }}51- shell: bash -eo pipefail -l {0}52- run: |53- nvm install --default ${{ matrix.node-version }}54- dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH"40+ - name: Setup Node.js ${{ matrix.node-version }}41+ uses: actions/setup-node@v442+ with:43+ node-version: ${{ matrix.node-version }}44 56- - name: Configure npm57- run: |58- npm config set loglevel error59- if [[ "$(npm config get package-lock)" == "true" ]]; then60- npm config set package-lock false61- else62- npm config set shrinkwrap false63- fi45+ - name: Configure npm loglevel46+ run: |47+ npm config set loglevel error48+ shell: bash49 65- - name: Install npm module(s) ${{ matrix.npm-i }}66- run: npm install --save-dev ${{ matrix.npm-i }}67- if: matrix.npm-i != ''50+ - name: Install dependencies51+ run: npm install52 69- - name: Remove non-test dependencies70- run: npm rm --silent --save-dev connect-redis53+ - name: Output Node and NPM versions54+ run: |55+ echo "Node.js version: $(node -v)"56+ echo "NPM version: $(npm -v)"57 72- - name: Setup Node.js version-specific dependencies73- shell: bash74- run: |75- # eslint for linting76- # - remove on Node.js < 1277- if [[ "$(cut -d. -f1 <<< "${{ matrix.node-version }}")" -lt 12 ]]; then78- node -pe 'Object.keys(require("./package").devDependencies).join("\n")' | \79- grep -E '^eslint(-|$)' | \80- sort -r | \81- xargs -n1 npm rm --silent --save-dev82- fi58+ - name: Run tests59+ shell: bash60+ run: |61+ npm run test-ci62+ cp coverage/lcov.info "coverage/${{ matrix.node-version }}.lcov"63 84- - name: Install Node.js dependencies85- run: npm install64+ - name: Collect code coverage65+ run: |66+ mv ./coverage "./${{ matrix.node-version }}"67+ mkdir ./coverage68+ mv "./${{ matrix.node-version }}" "./coverage/${{ matrix.node-version }}"69 87- - name: List environment88- id: list_env89- shell: bash90- run: |91- echo "node@$(node -v)"92- echo "npm@$(npm -v)"93- npm -s ls ||:94- (npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print $2 "=" $3 }' >> "$GITHUB_OUTPUT"70+ - name: Upload code coverage71+ uses: actions/upload-artifact@v372+ with:73+ name: coverage74+ path: ./coverage75+ retention-days: 176 96- - name: Run tests97- shell: bash98- run: |99- npm run test-ci100- cp coverage/lcov.info "coverage/${{ matrix.name }}.lcov"101-102- - name: Lint code103- if: steps.list_env.outputs.eslint != ''104- run: npm run lint105-106- - name: Collect code coverage107- run: |108- mv ./coverage "./${{ matrix.name }}"109- mkdir ./coverage110- mv "./${{ matrix.name }}" "./coverage/${{ matrix.name }}"111-112- - name: Upload code coverage113- uses: actions/upload-artifact@v3114- with:115- name: coverage116- path: ./coverage117- retention-days: 1118-77 coverage:78 needs: test79 runs-on: ubuntu-latest80 steps:20 unmodified lines