From 9f8d93ea04efce4d30dc7f7884d03aa653d33203 Mon Sep 17 00:00:00 2001 From: Maurizio Vitale Date: Wed, 28 Jun 2023 16:04:35 +0100 Subject: [PATCH] improve jobs deps (#8717) * improve jobs deps * remove from old --- .github/workflows/pull-request.yml | 40 ++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 051e13d25e..35343c1a5f 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -268,14 +268,44 @@ jobs: - uses: ./.github/actions/setup - uses: ./.github/actions/download-node-modules-and-artifacts - run: npx nx affected:build $NX_CALCULATION_FLAGS --prod - - run: npx nx build demoshell --configuration production - - run: npx nx affected --target=build-storybook $NX_CALCULATION_FLAGS --configuration=ci --parallel=1 - uses: ./.github/actions/upload-node-modules-and-artifacts + build-demoshell: + # long timeout required when cache has to be recreated + timeout-minutes: 30 + name: "Build demoshell" + runs-on: ubuntu-22.04 + needs: [setup] + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 # Fetch all history for all tags and branches + - uses: ./.github/actions/setup + - uses: ./.github/actions/download-node-modules-and-artifacts + - run: npx nx build demoshell --configuration production + - uses: ./.github/actions/upload-node-modules-and-artifacts + + build-storybook: + # long timeout required when cache has to be recreated + timeout-minutes: 30 + name: "Build storybook" + runs-on: ubuntu-22.04 + needs: [setup] + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 # Fetch all history for all tags and branches + - uses: ./.github/actions/setup + - uses: ./.github/actions/download-node-modules-and-artifacts + - run: npx nx affected --target=build-storybook $NX_CALCULATION_FLAGS --configuration=ci + - uses: ./.github/actions/upload-node-modules-and-artifacts + e2e-storybook: timeout-minutes: 20 name: "e2e: storybook" - needs: [build-libs, lint, unit-tests] + needs: [build-storybook] runs-on: ubuntu-22.04 steps: - name: Checkout repository @@ -294,7 +324,7 @@ jobs: e2e: timeout-minutes: 90 name: "e2e: ${{ matrix.e2e-test.description }}" - needs: [build-libs, lint, unit-tests] + needs: [build-libs] runs-on: ubuntu-22.04 strategy: fail-fast: false @@ -486,7 +516,7 @@ jobs: if: ${{ always() }} runs-on: ubuntu-latest name: Final Results - needs: [check-if-pr-is-approved, check-package-lock, setup, unit-tests, lint, build-libs, e2e, e2e-storybook] + needs: [unit-tests, lint, build-demoshell, e2e, e2e-storybook] steps: - uses: slackapi/slack-github-action@v1.23.0 name: Nofify QA failure