CI: migrate from Travis to GitHub Actions (split legacy/modern) #2
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-latest | |
| container: | |
| image: node:${{ matrix.node }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Print Node & npm versions | |
| run: | | |
| node -v | |
| npm -v | |
| - name: Install dependencies | |
| run: npm ci || npm i | |
| - name: Run tests (Travis parity) | |
| 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 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| - name: Print Node & npm versions | |
| run: | | |
| node -v | |
| npm -v | |
| - name: Install dependencies | |
| run: npm ci || npm i | |
| - name: Run tests (Travis parity) | |
| run: npm run test-with-temp-cloud |