Skip to content
Myr

🔧 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

2 files+57 added−103 removed

modified:.github/workflows/ci.yml+1 added-5 removed
modified:.github/workflows/legacy.yml+56 added-98 removed
1name: legacy23on: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'1617# Cancel in progress workflows18# in the scenario where we already had a run going for that PR/branch/tag but then triggered a new run19concurrency:20 group: "${{ github.workflow }} ✨ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"21 cancel-in-progress: true2223jobs: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/3122 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}}3327 - name: Node.js 12.x28 node-version: "12.22"29 npm-i: mocha@9.2.23031 - name: Node.js 13.x32 node-version: "13.14"33 npm-i: mocha@9.2.23435 - name: Node.js 14.x36 node-version: "14.20"3738 - name: Node.js 15.x39 node-version: "15.14"4041 - name: Node.js 16.x42 node-version: "16.20"4344 - name: Node.js 17.x45 node-version: "17.9"4634 runs-on: ${{ matrix.os }}35 steps:48 - uses: actions/checkout@v436 - uses: actions/checkout@v437 with:38 persist-credentials: false3950 - 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 }}4456 - 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: bash4965 - 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 install5269 - 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)"5772 - 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"6384 - 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 }}"6987 - 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: 17696 - name: Run tests97 shell: bash98 run: |99 npm run test-ci100 cp coverage/lcov.info "coverage/${{ matrix.name }}.lcov"101102 - name: Lint code103 if: steps.list_env.outputs.eslint != ''104 run: npm run lint105106 - name: Collect code coverage107 run: |108 mv ./coverage "./${{ matrix.name }}"109 mkdir ./coverage110 mv "./${{ matrix.name }}" "./coverage/${{ matrix.name }}"111112 - name: Upload code coverage113 uses: actions/upload-artifact@v3114 with:115 name: coverage116 path: ./coverage117 retention-days: 111877 coverage:78 needs: test79 runs-on: ubuntu-latest80 steps:
20 unmodified lines