Scheduling infrastructure for absolutely everyone.
refactor: move deps job to prepare job step to save ~20s per workflow (#26320)
Keith Williamsb4790dd2aa05
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.ymlindex 825d7cd286e..06dc5e2b8d1 100644--- a/.github/workflows/pr.yml+++ b/.github/workflows/pr.yml@@ -242,44 +242,46 @@ jobs:const labelFound = labels.map(l => l.name).includes('ready-for-e2e');console.log('Found the label?', labelFound);core.setOutput('run-e2e', labelFound);-- deps:- name: Install dependencies- needs: [prepare]- if: ${{ needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}- uses: ./.github/workflows/yarn-install.yml+ - uses: ./.github/actions/yarn-install+ if: ${{ steps.filter.outputs.has-files-requiring-all-checks == 'true' }}+ with:+ skip-install-if-cache-hit: "true"+ - uses: ./.github/actions/yarn-playwright-install+ if: ${{ steps.filter.outputs.has-files-requiring-all-checks == 'true' }}+ with:+ skip-install-if-cache-hit: "true"type-check:name: Type check- needs: [prepare, deps]+ needs: [prepare]if: ${{ needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}uses: ./.github/workflows/check-types.ymlsecrets: inheritlint:name: Linters- needs: [prepare, deps]+ needs: [prepare]if: ${{ needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}uses: ./.github/workflows/lint.ymlsecrets: inheritunit-test:name: Tests- needs: [prepare, deps]+ needs: [prepare]if: ${{ needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}uses: ./.github/workflows/unit-tests.ymlsecrets: inheritapi-v2-unit-test:name: Tests- needs: [prepare, deps]+ needs: [prepare]if: ${{ needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}uses: ./.github/workflows/api-v2-unit-tests.ymlsecrets: inheritsetup-db:name: Setup Database- needs: [prepare, deps]+ needs: [prepare]if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}uses: ./.github/workflows/setup-db.ymlwith:@@ -288,28 +290,28 @@ jobs:build-api-v1: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' }}uses: ./.github/workflows/api-v1-production-build.ymlsecrets: inheritbuild-api-v2:name: Production builds- needs: [prepare, deps]+ needs: [prepare]if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}uses: ./.github/workflows/api-v2-production-build.ymlsecrets: inheritbuild-atoms:name: Production builds- needs: [prepare, deps]+ needs: [prepare]if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}uses: ./.github/workflows/atoms-production-build.ymlsecrets: inheritbuild-docs:name: Production builds- needs: [prepare, deps]+ needs: [prepare]if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}uses: ./.github/workflows/docs-build.ymlsecrets: inherit@@ -323,7 +325,7 @@ jobs:build:name: Production builds- needs: [prepare, deps]+ needs: [prepare]if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}uses: ./.github/workflows/production-build-without-database.ymlsecrets: inherit@@ -344,7 +346,7 @@ jobs: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' }}uses: ./.github/workflows/check-api-v2-breaking-changes.ymlsecrets: inheritdiff --git a/.github/workflows/yarn-install.yml b/.github/workflows/yarn-install.ymldeleted file mode 100644index e9e4c6ca593..00000000000--- a/.github/workflows/yarn-install.yml+++ /dev/null@@ -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"