From 86b3f3e70a0a1d93afc09d08008f9be9d1e50436 Mon Sep 17 00:00:00 2001 From: Gabriel De Andrade Date: Wed, 22 Jan 2025 12:12:09 +0000 Subject: [PATCH] ci: cache after node setup --- .github/workflows/ci.yml | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 012f14dc..06fb2a8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,14 +32,6 @@ jobs: - 20.x - 22.x steps: - - name: Cache turbo build setup - uses: actions/cache@v4 - with: - path: .turbo - key: ${{ runner.os }}-turbo-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-turbo- - - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 with: @@ -48,6 +40,13 @@ jobs: with: node-version: ${{ matrix.node }} cache: 'pnpm' + - name: Cache turbo build setup + uses: actions/cache@v4 + with: + path: .turbo + key: ${{ runner.os }}-turbo-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-turbo- - run: pnpm install --frozen-lockfile - run: pnpm build && pnpm build:cjs # - run: pnpm lint # TODO: fix linting @@ -58,13 +57,6 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - name: Cache turbo build setup - uses: actions/cache@v4 - with: - path: .turbo - key: ${{ runner.os }}-turbo-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-turbo- - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 with: @@ -73,6 +65,13 @@ jobs: with: node-version: 20.x cache: 'pnpm' + - name: Cache turbo build setup + uses: actions/cache@v4 + with: + path: .turbo + key: ${{ runner.os }}-turbo-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-turbo- - run: pnpm install --frozen-lockfile - run: pnpm run build --filter='./packages/*' && pnpm run build:cjs --filter='./packages/*' - run: pnpx pkg-pr-new publish './packages/*'