From bc888f218b8b7b870c00f6bef29598d38bfdb39f Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sat, 16 Apr 2022 01:21:07 -0400 Subject: [PATCH] simplify changes to CI --- .github/workflows/continuous-integration.yml | 98 ++------------------ 1 file changed, 8 insertions(+), 90 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 6e77314a4..a89cfe02f 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -42,99 +42,10 @@ jobs: name: ts-node-packed.tgz path: tests/ts-node-packed.tgz - test-1: + test: needs: lint-build name: "Test: ${{ matrix.os }}, node ${{ matrix.node }}, TS ${{ matrix.typescript }}" runs-on: ${{ matrix.os }}-latest - strategy: - fail-fast: false - matrix: - os: [ubuntu, windows] - # Don't forget to add all new flavors to this list! - flavor: [12] - include: - # Node 17 - - flavor: 12 - node: 17 - nodeFlag: 17 - typescript: latest - typescriptFlag: latest - downgradeNpm: true - steps: - # checkout code - - uses: actions/checkout@v2 - # install node - - name: Use Node.js ${{ matrix.node }} - if: matrix.node != 'nightly' - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node }} - - name: Use Node.js 16, will be subsequently overridden by download of nightly - if: matrix.node == 'nightly' - uses: actions/setup-node@v1 - with: - node-version: 16 - - name: Download Node.js nightly - if: matrix.node == 'nightly' && matrix.os == 'ubuntu' - run: | - export N_PREFIX=$(pwd)/n - npm install -g n - n nightly - sudo cp "${N_PREFIX}/bin/node" "$(which node)" - node --version - - name: Download Node.js nightly - if: matrix.node == 'nightly' && matrix.os == 'windows' - run: | - $version = (Invoke-WebRequest https://nodejs.org/download/nightly/index.json | ConvertFrom-json)[0].version - $url = "https://nodejs.org/download/nightly/$version/win-x64/node.exe" - $targetPath = (Get-Command node.exe).Source - Invoke-WebRequest -Uri $url -OutFile $targetPath -UserAgent ([Microsoft.PowerShell.Commands.PSUserAgent]::Chrome) - node --version - # lint, build, test - # Downgrade from npm 7 to 6 because 7 still seems buggy to me - - if: ${{ matrix.downgradeNpm }} - run: npm install -g npm@6 - - run: | - npm config set cache "$( node -p "process.cwd()" )/temp/npm-cache" - - name: Cache dependencies - if: ${{ matrix.os != 'windows' }} - uses: actions/cache@v2 - with: - path: temp/npm-cache - key: npm-cache-${{ matrix.os }}-${{ hashFiles('package-lock.json') }} - restore-keys: npm-cache-${{matrix.os }}- - - run: npm ci --ignore-scripts - - name: Upload npm logs - if: ${{ failure() }} - uses: actions/upload-artifact@v1 - with: - name: npm-logs - path: temp/npm-cache/_logs - - run: npm run build-tsc - - name: Download package artifact - uses: actions/download-artifact@v1 - with: - name: ts-node-packed.tgz - path: tests/ - - run: npm install typescript@${{ matrix.typescript }} --force - - run: npm run test-cov - - name: Upload npm logs - if: ${{ failure() }} - uses: actions/upload-artifact@v1 - with: - name: npm-logs-${{ matrix.os }}-node-${{ matrix.nodeFlag }}-typescript-${{ matrix.typescriptFlag }} - path: temp/npm-cache/_logs - - run: npm run coverage-report - if: ${{ always() }} - - name: Codecov - if: ${{ always() }} - uses: codecov/codecov-action@v1 - with: - flags: ${{ matrix.os }},node_${{ matrix.nodeFlag }},typescript_${{ matrix.typescriptFlag }} - test-2: - needs: test-1 - name: "Test: ${{ matrix.os }}, node ${{ matrix.node }}, TS ${{ matrix.typescript }}" - runs-on: ${{ matrix.os }}-latest strategy: fail-fast: false matrix: @@ -211,6 +122,13 @@ jobs: typescript: next typescriptFlag: next downgradeNpm: true + # Node 17 + - flavor: 12 + node: 17 + nodeFlag: 17 + typescript: latest + typescriptFlag: latest + downgradeNpm: true # Node nightly - flavor: 13 node: nightly