diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73e5e852fb..e3a1bdb3b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: concurrency: group: ci-${{ github.ref }} - cancel-in-progress: false + cancel-in-progress: ${{ github.event_name == 'pull_request' }} permissions: contents: read diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 10dd6f0b01..456472576f 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -10,7 +10,7 @@ permissions: jobs: test-build: name: Test and Build - runs-on: blacksmith-4vcpu-ubuntu-2404 + runs-on: blacksmith-8vcpu-ubuntu-2404 steps: - name: Checkout code @@ -38,6 +38,20 @@ jobs: key: ${{ github.repository }}-node-modules path: ./node_modules + - name: Mount Turbo cache (Sticky Disk) + uses: useblacksmith/stickydisk@v1 + with: + key: ${{ github.repository }}-turbo-cache + path: ./.turbo + + - name: Restore Next.js build cache + uses: actions/cache@v4 + with: + path: ./apps/sim/.next/cache + key: ${{ runner.os }}-nextjs-${{ hashFiles('bun.lock') }} + restore-keys: | + ${{ runner.os }}-nextjs- + - name: Install dependencies run: bun install --frozen-lockfile @@ -85,6 +99,7 @@ jobs: NEXT_PUBLIC_APP_URL: 'https://www.sim.ai' DATABASE_URL: 'postgresql://postgres:postgres@localhost:5432/simstudio' ENCRYPTION_KEY: '7cf672e460e430c1fba707575c2b0e2ad5a99dddf9b7b7e3b5646e630861db1c' # dummy key for CI only + TURBO_CACHE_DIR: .turbo run: bun run test - name: Check schema and migrations are in sync @@ -110,6 +125,7 @@ jobs: RESEND_API_KEY: 'dummy_key_for_ci_only' AWS_REGION: 'us-west-2' ENCRYPTION_KEY: '7cf672e460e430c1fba707575c2b0e2ad5a99dddf9b7b7e3b5646e630861db1c' # dummy key for CI only + TURBO_CACHE_DIR: .turbo run: bunx turbo run build --filter=sim - name: Upload coverage to Codecov