diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 05a256b4..76cd2824 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,8 +45,16 @@ jobs: - name: Install deps (with cache) run: pnpm install --frozen-lockfile + - name: Cache turbo build setup + uses: actions/cache@v3 + with: + path: .turbo + key: ${{ runner.os }}-turbo-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-turbo- + - name: Build, lint and type-check - run: pnpm turbo db:generate build lint type-check test + run: pnpm turbo run db:generate build lint type-check test --cache-dir=.turbo - name: Check workspaces run: pnpm manypkg check diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index ce69d15e..23e07ecb 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -34,12 +34,30 @@ jobs: run: | echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT - - name: Install dependencies - run: pnpm install + - name: Setup pnpm cache + uses: actions/cache@v3 + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install deps (with cache) + run: pnpm install --frozen-lockfile + - name: Install Playwright Browsers run: pnpm exec playwright install --with-deps + + - name: Cache turbo build setup + uses: actions/cache@v3 + with: + path: .turbo + key: ${{ runner.os }}-turbo-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-turbo- + - name: Run Playwright tests - run: pnpm run test:e2e + run: pnpm turbo run e2e --cache-dir=.turbo - uses: actions/upload-artifact@v3 if: always() diff --git a/turbo.json b/turbo.json index 554ab0db..aaac5355 100644 --- a/turbo.json +++ b/turbo.json @@ -61,7 +61,7 @@ }, "test": {}, "type-check": { - "dependsOn": ["^db:generate", "^build"] + "dependsOn": ["^build"] } } }