feat: Add node cache for faster alias resolution (#612) #640
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: Node.js | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| node-version: [18, 20, latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: { submodules: true } | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - run: npm ci | |
| - run: npm test | |
| - run: npm run test:dist | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: { node-version: 20 } | |
| - run: npm ci | |
| - run: npm run lint | |
| node-16: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: ['16.0.0', '16'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: { submodules: true } | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - run: npm ci | |
| - run: npm install --no-save rollup@3 | |
| - run: npm test | |
| - run: npm run test:dist | |
| node-14-build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: ['14.18.0'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: { submodules: true } | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - run: npm install --global npm@7 | |
| - run: npm ci | |
| - run: npm install --no-save rollup@2 | |
| - run: npm run test:dist | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: yaml-node14 | |
| path: dist/ | |
| node-14-run: | |
| needs: node-14-build | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: ['14.6.0', '14', '15.0.0'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: { submodules: true } | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - run: npm install --global npm@7 | |
| - run: npm ci | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: yaml-node14 | |
| path: dist/ | |
| - run: npx jest --config config/jest.config.js | |
| env: | |
| TEST: dist |