Add standard front component ci (#18560)

Checks if the build has been generated correctly before merging
This commit is contained in:
Raphaël Bosi 2026-03-11 16:06:13 +01:00 committed by GitHub
parent 21de221420
commit b2f053490d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,66 @@
name: CI Twenty Standard Front Component
on:
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
changed-files-check:
uses: ./.github/workflows/changed-files.yaml
with:
files: |
package.json
yarn.lock
packages/twenty-standard-application/**
packages/twenty-sdk/**
packages/twenty-shared/**
standard-front-component-build-check:
needs: changed-files-check
if: needs.changed-files-check.outputs.any_changed == 'true'
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Fetch custom Github Actions and base branch history
uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Install dependencies
uses: ./.github/actions/yarn-install
- name: Build twenty-shared
run: npx nx build twenty-shared
- name: Build twenty-sdk
run: npx nx build twenty-sdk
- name: Build twenty-standard-application
run: npx nx build twenty-standard-application
- name: Check for pending standard front component build
run: |
if ! git diff --quiet -- packages/twenty-standard-application/src/build packages/twenty-standard-application/src/standard-front-component-build-manifest.ts; then
echo "::error::Standard front component build output is out of date. Please run 'npx nx build twenty-standard-application' and commit the changes."
echo ""
echo "The following changes were detected:"
echo "==================================================="
git diff -- packages/twenty-standard-application/src/build packages/twenty-standard-application/src/standard-front-component-build-manifest.ts
echo "==================================================="
exit 1
fi
ci-twenty-standard-front-component-status-check:
if: always() && !cancelled()
timeout-minutes: 5
runs-on: ubuntu-latest
needs:
[
changed-files-check,
standard-front-component-build-check,
]
steps:
- name: Fail job if any needs failed
if: contains(needs.*.result, 'failure')
run: exit 1