From dc572093d27866dcc08f0a279ffe09be0e680220 Mon Sep 17 00:00:00 2001 From: VitoAlbano Date: Thu, 13 Mar 2025 19:08:06 +0000 Subject: [PATCH] [AAE-32905] - Maybe i was too optimistic --- .github/workflows/build-lib-workflow.yml | 28 ++++++++++++++++++++++++ .github/workflows/pull-request-save.yml | 18 +++++++-------- .github/workflows/pull-request.yml | 7 ++++++ .github/workflows/unit-test-workflow.yml | 1 - 4 files changed, 44 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/build-lib-workflow.yml diff --git a/.github/workflows/build-lib-workflow.yml b/.github/workflows/build-lib-workflow.yml new file mode 100644 index 0000000000..2cac91887e --- /dev/null +++ b/.github/workflows/build-lib-workflow.yml @@ -0,0 +1,28 @@ +name: "Build Lib Workflow" + +on: + workflow_call: + inputs: + matrix: + description: 'JSON Matrix of projects' + required: true + type: string + +jobs: + unit-tests: + runs-on: ubuntu-latest + strategy: + matrix: + include: ${{ fromJson(inputs.matrix) }} + steps: + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - name: Setup environment + uses: ./.github/actions/setup + - name: Run build for ${{ matrix.project }} + env: + NODE_OPTIONS: "--max-old-space-size=5120" + run: | + xvfb-run --auto-servernum npx nx run ${{ matrix.project }}:build:production diff --git a/.github/workflows/pull-request-save.yml b/.github/workflows/pull-request-save.yml index 134f3a613d..d6b6e4db77 100644 --- a/.github/workflows/pull-request-save.yml +++ b/.github/workflows/pull-request-save.yml @@ -197,15 +197,15 @@ jobs: echo "Matrix JSON: $MATRIX_JSON" echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT - trigger-unit-tests: - name: "Unit Tests" - runs-on: ubuntu-latest - needs: [generate-affected-matrix] - steps: - - name: Call unit tests workflow - uses: ./.github/workflows/unit-test-workflow.yml@main - with: - matrix: ${{ needs.generate-affected-matrix.outputs.matrix }} + # trigger-unit-tests: + # name: "Unit Tests" + # runs-on: ubuntu-latest + # needs: [generate-affected-matrix] + # steps: + # - name: Call unit tests workflow + # uses: ./.github/workflows/unit-test-workflow.yml@main + # with: + # matrix: ${{ needs.generate-affected-matrix.outputs.matrix }} lint: # long timeout required when cache has to be recreated diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 8ac8be66e1..e1c78758b1 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -209,6 +209,13 @@ jobs: echo "Matrix JSON: $MATRIX_JSON" echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT + trigger-build: + name: "Build Libs" + needs: [generate-affected-matrix] + uses: ./.github/workflows/unit-test-workflow.yml + with: + matrix: ${{ needs.generate-affected-matrix.outputs.matrix }} + trigger-unit-tests: name: "Unit Tests" needs: [generate-affected-matrix] diff --git a/.github/workflows/unit-test-workflow.yml b/.github/workflows/unit-test-workflow.yml index 84324cf7e5..b1486cef7f 100644 --- a/.github/workflows/unit-test-workflow.yml +++ b/.github/workflows/unit-test-workflow.yml @@ -14,7 +14,6 @@ jobs: strategy: matrix: include: ${{ fromJson(inputs.matrix) }} - max-parallel: 4 steps: - name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683