From fb5e75d73e0d116cfc6143d4ee5a31611591fb81 Mon Sep 17 00:00:00 2001 From: Marco Carrozzo Date: Wed, 11 Jan 2023 17:43:55 +0100 Subject: [PATCH] add build-libs step --- .github/workflows/pull-request.yml | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 3801c73ced..d7eab54078 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -65,7 +65,7 @@ env: DOCKER_REPOSITORY: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/demo-shell" jobs: - main: + setup: # long timeout required when cache has to be recreated timeout-minutes: 30 name: "Build Components" @@ -82,10 +82,6 @@ jobs: nx run cli:bundle nx run testing:bundle - run: nx affected --target=lint $NX_CALCULATION_FLAGS - - run: /usr/bin/xvfb-run --auto-servernum nx affected:test $NX_CALCULATION_FLAGS --exclude="insights,core,extensions,process-services,process-services-cloud" }} - - run: nx affected:build $NX_CALCULATION_FLAGS --prod - - run: nx build demoshell --configuration production - - run: nx run stories:build-storybook --configuration ci - uses: ./.github/actions/upload-cache-and-artifacts unit-tests: @@ -116,10 +112,28 @@ jobs: - name: Run unit tests run: nx affected:test $NX_CALCULATION_FLAGS --exclude="${{ matrix.unit-tests.exclude }}" - e2e storybook: + build-libs: + # long timeout required when cache has to be recreated + timeout-minutes: 30 + name: "Build Components" + runs-on: ubuntu-22.04 + needs: [unit-tests] + 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-cache-and-artifacts + - run: nx affected:build $NX_CALCULATION_FLAGS --prod + - run: nx build demoshell --configuration production + - run: nx run stories:build-storybook --configuration ci + - uses: ./.github/actions/upload-cache-and-artifacts + + e2e-storybook: timeout-minutes: 20 name: "playwright" - needs: [unit-tests] + needs: [build-libs] runs-on: ubuntu-22.04 steps: - name: Checkout repository @@ -138,7 +152,7 @@ jobs: e2e: timeout-minutes: 90 name: "e2e: ${{ matrix.e2e-test.description }}" - needs: [unit-tests] + needs: [build-libs] runs-on: ubuntu-22.04 strategy: fail-fast: false