feat: cache V executable to speed up subsequent runs #44
Workflow file for this run
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: | |
| tags: | |
| - v* | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Lint check | |
| run: npm run lint | |
| - name: Test | |
| run: npm run test | |
| - name: Build | |
| run: npm run build | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: build-output | |
| path: lib/ | |
| test-action: | |
| needs: build | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| scenario: [check-latest, stable, version] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: build-output | |
| path: lib/ | |
| - name: Run Action (check-latest) | |
| if: matrix.scenario == 'check-latest' | |
| uses: ./ | |
| with: | |
| check-latest: true | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run Action (stable) | |
| if: matrix.scenario == 'stable' | |
| uses: ./ | |
| with: | |
| stable: true | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run Action (version) | |
| if: matrix.scenario == 'version' | |
| uses: ./ | |
| with: | |
| version: '0.5.1' | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Test if the executable is available | |
| run: v version |