feat: Cat 720 improve pre merge ci (#14116)

This commit is contained in:
shortstacked
2025-03-24 13:02:49 +00:00
committed by GitHub
parent b9608647ca
commit 743b63e97a
2 changed files with 20 additions and 21 deletions

View File

@@ -65,11 +65,9 @@ jobs:
run: echo "value=sha-$GITHUB_SHA-time-$(date +"%s")" >> $GITHUB_OUTPUT run: echo "value=sha-$GITHUB_SHA-time-$(date +"%s")" >> $GITHUB_OUTPUT
install: install:
runs-on: ubuntu-latest runs-on: blacksmith-4vcpu-ubuntu-2204
needs: ['prepare'] needs: ['prepare']
container:
image: cypress/${{ inputs.run-env }}
options: --user 1001
steps: steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
@@ -83,10 +81,22 @@ jobs:
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 - 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 - name: Install dependencies
if: steps.cache-build-artifacts.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile
- name: Cypress build - name: Cypress build
if: steps.cache-build-artifacts.outputs.cache-hit != 'true'
uses: cypress-io/github-action@1b70233146622b69e789ccdd4f9452adc638d25a # v6.6.1 uses: cypress-io/github-action@1b70233146622b69e789ccdd4f9452adc638d25a # v6.6.1
with: with:
# Disable running of tests within install job # Disable running of tests within install job
@@ -95,23 +105,13 @@ jobs:
build: pnpm build build: pnpm build
- name: Cypress install - name: Cypress install
if: steps.cache-build-artifacts.outputs.cache-hit != 'true'
working-directory: cypress working-directory: cypress
run: pnpm cypress:install 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: testing:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: cypress/${{ inputs.run-env }}
options: --user 1001
needs: ['prepare', 'install'] needs: ['prepare', 'install']
strategy: strategy:
fail-fast: false fail-fast: false
@@ -133,13 +133,14 @@ jobs:
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Restore cached pnpm modules - 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: with:
path: | path: |
/github/home/.cache /home/runner/.cache/Cypress
/github/home/.pnpm-store /github/home/.pnpm-store
./packages/**/dist ./packages/**/dist
key: ${{ github.sha }}-e2e key: ${{ github.sha }}:build-artifacts
- name: Install dependencies - name: Install dependencies
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile

View File

@@ -17,9 +17,7 @@ on:
jobs: jobs:
lint: lint:
name: Lint name: Lint
runs-on: blacksmith-2vcpu-ubuntu-2204 runs-on: blacksmith-4vcpu-ubuntu-2204
env:
NODE_OPTIONS: '--max-old-space-size=4096'
steps: steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with: