chore: Try a new apporach for testing legacy Node versions #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: ["**"] | |
| pull_request: | |
| branches: ["**"] | |
| jobs: | |
| test-legacy: | |
| name: Legacy Node ${{ matrix.node }} • tests | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node: ["9", "10"] | |
| runs-on: ubuntu-20.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js (legacy) | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Print Node & npm versions | |
| run: | | |
| node -v | |
| npm -v | |
| - name: Install dependencies (legacy compatible) | |
| run: | | |
| npm config set registry https://registry.npmjs.org/ | |
| npm install --no-package-lock --legacy-peer-deps || npm install --no-package-lock | |
| - name: Run tests with timeout | |
| timeout-minutes: 25 | |
| run: npm run test-with-temp-cloud | |
| test-modern: | |
| name: Node ${{ matrix.node }} • tests | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node: ["12", "14", "16", "18", "20", "22"] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Print Node & npm versions | |
| run: | | |
| node -v | |
| npm -v | |
| - name: Install dependencies | |
| run: npm ci || npm i | |
| - name: Run tests with timeout | |
| timeout-minutes: 25 | |
| run: npm run test-with-temp-cloud |