refactor: move deps job to prepare job step to save ~20s per workflow (#26320)

* refactor: move deps job to prepare job step to save ~10s per workflow

Co-Authored-By: [email protected] <[email protected]>

* chore: remove unused yarn-install.yml workflow

Co-Authored-By: [email protected] <[email protected]>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Keith WilliamsandDevin AI authored and GitHub committed 2025-12-30 14:44:23 -03:00
1 parent 77ff8607d1
commit b4790dd2aa
2 files changed
+19 -39

No files matched your search

+19 -17
View File
@@ -242,44 +242,46 @@ jobs:
const labelFound = labels.map(l => l.name).includes('ready-for-e2e'); const labelFound = labels.map(l => l.name).includes('ready-for-e2e');
console.log('Found the label?', labelFound); console.log('Found the label?', labelFound);
core.setOutput('run-e2e', labelFound); core.setOutput('run-e2e', labelFound);
- uses: ./.github/actions/yarn-install
deps: if: ${{ steps.filter.outputs.has-files-requiring-all-checks == 'true' }}
name: Install dependencies with:
needs: [prepare] skip-install-if-cache-hit: "true"
if: ${{ needs.prepare.outputs.has-files-requiring-all-checks == 'true' }} - uses: ./.github/actions/yarn-playwright-install
uses: ./.github/workflows/yarn-install.yml if: ${{ steps.filter.outputs.has-files-requiring-all-checks == 'true' }}
with:
skip-install-if-cache-hit: "true"
type-check: type-check:
name: Type check name: Type check
needs: [prepare, deps] needs: [prepare]
if: ${{ needs.prepare.outputs.has-files-requiring-all-checks == 'true' }} if: ${{ needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/check-types.yml uses: ./.github/workflows/check-types.yml
secrets: inherit secrets: inherit
lint: lint:
name: Linters name: Linters
needs: [prepare, deps] needs: [prepare]
if: ${{ needs.prepare.outputs.has-files-requiring-all-checks == 'true' }} if: ${{ needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/lint.yml uses: ./.github/workflows/lint.yml
secrets: inherit secrets: inherit
unit-test: unit-test:
name: Tests name: Tests
needs: [prepare, deps] needs: [prepare]
if: ${{ needs.prepare.outputs.has-files-requiring-all-checks == 'true' }} if: ${{ needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/unit-tests.yml uses: ./.github/workflows/unit-tests.yml
secrets: inherit secrets: inherit
api-v2-unit-test: api-v2-unit-test:
name: Tests name: Tests
needs: [prepare, deps] needs: [prepare]
if: ${{ needs.prepare.outputs.has-files-requiring-all-checks == 'true' }} if: ${{ needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/api-v2-unit-tests.yml uses: ./.github/workflows/api-v2-unit-tests.yml
secrets: inherit secrets: inherit
setup-db: setup-db:
name: Setup Database name: Setup Database
needs: [prepare, deps] needs: [prepare]
if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-files-requiring-all-checks == 'true' }} if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/setup-db.yml uses: ./.github/workflows/setup-db.yml
with: with:
@@ -288,28 +290,28 @@ jobs:
build-api-v1: build-api-v1:
name: Production builds name: Production builds
needs: [prepare, deps, setup-db] needs: [prepare, setup-db]
if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-files-requiring-all-checks == 'true' }} if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/api-v1-production-build.yml uses: ./.github/workflows/api-v1-production-build.yml
secrets: inherit secrets: inherit
build-api-v2: build-api-v2:
name: Production builds name: Production builds
needs: [prepare, deps] needs: [prepare]
if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-files-requiring-all-checks == 'true' }} if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/api-v2-production-build.yml uses: ./.github/workflows/api-v2-production-build.yml
secrets: inherit secrets: inherit
build-atoms: build-atoms:
name: Production builds name: Production builds
needs: [prepare, deps] needs: [prepare]
if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-files-requiring-all-checks == 'true' }} if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/atoms-production-build.yml uses: ./.github/workflows/atoms-production-build.yml
secrets: inherit secrets: inherit
build-docs: build-docs:
name: Production builds name: Production builds
needs: [prepare, deps] needs: [prepare]
if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-files-requiring-all-checks == 'true' }} if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/docs-build.yml uses: ./.github/workflows/docs-build.yml
secrets: inherit secrets: inherit
@@ -323,7 +325,7 @@ jobs:
build: build:
name: Production builds name: Production builds
needs: [prepare, deps] needs: [prepare]
if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-files-requiring-all-checks == 'true' }} if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/production-build-without-database.yml uses: ./.github/workflows/production-build-without-database.yml
secrets: inherit secrets: inherit
@@ -344,7 +346,7 @@ jobs:
check-api-v2-breaking-changes: check-api-v2-breaking-changes:
name: Check API v2 breaking changes name: Check API v2 breaking changes
needs: [prepare, deps] needs: [prepare]
if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-files-requiring-all-checks == 'true' }} if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/check-api-v2-breaking-changes.yml uses: ./.github/workflows/check-api-v2-breaking-changes.yml
secrets: inherit secrets: inherit
-22
View File
@@ -1,22 +0,0 @@
name: Yarn install
on:
workflow_call:
permissions:
contents: read
jobs:
setup:
name: Yarn install & cache
runs-on: blacksmith-2vcpu-ubuntu-2404
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/dangerous-git-checkout
- uses: ./.github/actions/yarn-install
with:
skip-install-if-cache-hit: "true"
- uses: ./.github/actions/yarn-playwright-install
with:
skip-install-if-cache-hit: "true"