chore(turbo): add remote cache to reduce duplicated ci or build #788
Workflow file for this run
This file contains 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: | |
- main | |
pull_request: | |
types: [opened, synchronize, reopened] | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
quality: | |
name: Check quality | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
command: ['lint', 'lint:attw', 'lint:pub', 'test', 'test:tsd', 'type:check'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8.5.1 | |
- uses: actions/setup-node@v3 | |
with: | |
cache: 'pnpm' | |
cache-dependency-path: 'pnpm-lock.yaml' | |
node-version-file: '.nvmrc' | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm prepack | |
- name: Run commands | |
run: pnpm ${{ matrix.command }} |