From 743b63e97a9a96dfaf35f138a79eddaad9bb2dbb Mon Sep 17 00:00:00 2001 From: shortstacked Date: Mon, 24 Mar 2025 13:02:49 +0000 Subject: [PATCH] feat: Cat 720 improve pre merge ci (#14116) --- .github/workflows/e2e-reusable.yml | 37 +++++++++++++------------- .github/workflows/linting-reusable.yml | 4 +-- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/.github/workflows/e2e-reusable.yml b/.github/workflows/e2e-reusable.yml index dfd8fc9336..c8247051a0 100644 --- a/.github/workflows/e2e-reusable.yml +++ b/.github/workflows/e2e-reusable.yml @@ -65,11 +65,9 @@ jobs: run: echo "value=sha-$GITHUB_SHA-time-$(date +"%s")" >> $GITHUB_OUTPUT install: - runs-on: ubuntu-latest + runs-on: blacksmith-4vcpu-ubuntu-2204 needs: ['prepare'] - container: - image: cypress/${{ inputs.run-env }} - options: --user 1001 + steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: @@ -83,10 +81,22 @@ jobs: - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 + - name: Cache build artifacts + id: cache-build-artifacts + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 + with: + path: | + /home/runner/.cache/Cypress + /github/home/.pnpm-store + ./packages/**/dist + key: ${{ github.sha }}:build-artifacts + - name: Install dependencies + if: steps.cache-build-artifacts.outputs.cache-hit != 'true' run: pnpm install --frozen-lockfile - name: Cypress build + if: steps.cache-build-artifacts.outputs.cache-hit != 'true' uses: cypress-io/github-action@1b70233146622b69e789ccdd4f9452adc638d25a # v6.6.1 with: # Disable running of tests within install job @@ -95,23 +105,13 @@ jobs: build: pnpm build - name: Cypress install + if: steps.cache-build-artifacts.outputs.cache-hit != 'true' working-directory: cypress run: pnpm cypress:install - - name: Cache build artifacts - uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 - with: - path: | - /github/home/.cache - /github/home/.pnpm-store - ./packages/**/dist - key: ${{ github.sha }}-e2e testing: runs-on: ubuntu-latest - container: - image: cypress/${{ inputs.run-env }} - options: --user 1001 needs: ['prepare', 'install'] strategy: fail-fast: false @@ -133,13 +133,14 @@ jobs: - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 - name: Restore cached pnpm modules - uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 + id: cache-build-artifacts + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: path: | - /github/home/.cache + /home/runner/.cache/Cypress /github/home/.pnpm-store ./packages/**/dist - key: ${{ github.sha }}-e2e + key: ${{ github.sha }}:build-artifacts - name: Install dependencies run: pnpm install --frozen-lockfile diff --git a/.github/workflows/linting-reusable.yml b/.github/workflows/linting-reusable.yml index 03e4257c45..32db6d1e48 100644 --- a/.github/workflows/linting-reusable.yml +++ b/.github/workflows/linting-reusable.yml @@ -17,9 +17,7 @@ on: jobs: lint: name: Lint - runs-on: blacksmith-2vcpu-ubuntu-2204 - env: - NODE_OPTIONS: '--max-old-space-size=4096' + runs-on: blacksmith-4vcpu-ubuntu-2204 steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: