From 0199d5f72a6eb4b9c686dae5e169b0dec42cbd7e Mon Sep 17 00:00:00 2001 From: Antoine Moreaux Date: Mon, 7 Jul 2025 14:51:18 +0200 Subject: [PATCH] feat(ci): add GraphQL check workflow and update dependencies setup (#13075) --- .github/workflows/ci-server.yaml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-server.yaml b/.github/workflows/ci-server.yaml index d25cc122f..046ffcece 100644 --- a/.github/workflows/ci-server.yaml +++ b/.github/workflows/ci-server.yaml @@ -101,8 +101,24 @@ jobs: exit 1 fi + - name: Save server setup + uses: ./.github/workflows/actions/save-cache + with: + key: ${{ steps.restore-server-setup-cache.outputs.cache-primary-key }} + + graphql-check: + timeout-minutes: 10 + runs-on: depot-ubuntu-24.04-8 + needs: [server-setup, changed-files-check] + if: needs.changed-files-check.outputs.any_changed == 'true' + steps: + - name: Fetch custom Github Actions and base branch history + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install dependencies + uses: ./.github/workflows/actions/yarn-install - name: GraphQL / Check for Pending Generation - if: steps.changed-files.outputs.any_changed == 'true' run: | # Run GraphQL generation commands npx nx run twenty-front:graphql:generate @@ -113,10 +129,6 @@ jobs: echo "::error::GraphQL schema changes detected. Please run 'npx nx run twenty-front:graphql:generate' and 'npx nx run twenty-front:graphql:generate --configuration=metadata' and commit the changes." exit 1 fi - - name: Save server setup - uses: ./.github/workflows/actions/save-cache - with: - key: ${{ steps.restore-server-setup-cache.outputs.cache-primary-key }} server-test: timeout-minutes: 30 @@ -230,7 +242,7 @@ jobs: if: always() && !cancelled() timeout-minutes: 5 runs-on: depot-ubuntu-24.04-8 - needs: [changed-files-check, server-setup, server-test, server-integration-test] + needs: [changed-files-check, server-setup, graphql-check, server-test, server-integration-test] steps: - name: Fail job if any needs failed if: contains(needs.*.result, 'failure')