diff --git a/.github/workflows/turborepo-test.yml b/.github/workflows/turborepo-test.yml index 97759474a201f..876b4ea453f91 100644 --- a/.github/workflows/turborepo-test.yml +++ b/.github/workflows/turborepo-test.yml @@ -224,6 +224,35 @@ jobs: run: | cargo check --workspace + turbo_types_check: + name: "@turbo/types codegen check" + needs: + - find-changes + if: ${{ needs.find-changes.outputs.rest == 'true' }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: "Setup Node" + uses: ./.github/actions/setup-node + + - name: Install Global Turbo + uses: ./.github/actions/install-global-turbo + + - name: Build turbo-types schemas + run: | + turbo build --filter=@turbo/types + + - name: Check for uncommitted changes + run: | + if ! git diff --exit-code; then + echo "::error::Generated schema files are out of sync with TypeScript types" + echo "::error::Please run 'turbo build --filter=@turbo/types' and commit the changes" + git diff + exit 1 + fi + rust_test: strategy: fail-fast: false @@ -384,6 +413,7 @@ jobs: - integration - rust_lint - rust_check + - turbo_types_check - rust_test - basic-example - kitchen-sink-example @@ -410,6 +440,7 @@ jobs: subjob ${{needs.integration.result}} subjob ${{needs.rust_lint.result}} subjob ${{needs.rust_check.result}} + subjob ${{needs.turbo_types_check.result}} subjob ${{needs.rust_test.result}} subjob ${{needs.basic-example.result}} subjob ${{needs.kitchen-sink-example.result}}