Scheduling infrastructure for absolutely everyone.
chore: Add build of API v2 to PR checks (#14902)
Keith Williams83917e865555
diff --git a/.github/workflows/api-v1-production-build.yml b/.github/workflows/api-v1-production-build.ymlindex fc4a1405784..b611219bf27 100644--- a/.github/workflows/api-v1-production-build.yml+++ b/.github/workflows/api-v1-production-build.yml@@ -39,7 +39,7 @@ env:jobs:build:- name: Build API V1+ name: Build API v1runs-on: buildjet-4vcpu-ubuntu-2204timeout-minutes: 30services:diff --git a/.github/workflows/api-v2-production-build.yml b/.github/workflows/api-v2-production-build.ymlnew file mode 100644index 00000000000..31cb8a23e0d--- /dev/null+++ b/.github/workflows/api-v2-production-build.yml@@ -0,0 +1,42 @@+name: Production Build++on:+ workflow_call:++env:+ DATABASE_URL: ${{ secrets.CI_DATABASE_URL }}+ DATABASE_DIRECT_URL: ${{ secrets.CI_DATABASE_URL }}++jobs:+ build:+ name: Build API v2+ runs-on: buildjet-4vcpu-ubuntu-2204+ timeout-minutes: 30+ services:+ postgres:+ image: postgres:13+ credentials:+ username: ${{ secrets.DOCKERHUB_USERNAME }}+ password: ${{ secrets.DOCKERHUB_TOKEN }}+ env:+ POSTGRES_USER: postgres+ POSTGRES_PASSWORD: postgres+ POSTGRES_DB: calendso+ options: >-+ --health-cmd pg_isready+ --health-interval 10s+ --health-timeout 5s+ --health-retries 5+ ports:+ - 5432:5432+ steps:+ - uses: actions/checkout@v3+ - uses: ./.github/actions/dangerous-git-checkout+ - uses: ./.github/actions/yarn-install+ - run: |+ export NODE_OPTIONS="--max_old_space_size=8192"+ yarn workspace @calcom/api-v2 run generate-schemas+ rm -rf apps/api/v2/node_modules+ yarn install+ yarn workspace @calcom/api-v2 run build+ shell: bashdiff --git a/.github/workflows/pr.yml b/.github/workflows/pr.ymlindex 9263005baca..1334dd69a4e 100644--- a/.github/workflows/pr.yml+++ b/.github/workflows/pr.yml@@ -63,6 +63,13 @@ jobs:uses: ./.github/workflows/api-v1-production-build.ymlsecrets: inherit+ build-api-v2:+ name: Production build+ needs: [changes]+ if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}+ uses: ./.github/workflows/api-v2-production-build.yml+ secrets: inherit+build-without-database:name: Production build (without database)needs: [changes]@@ -72,28 +79,28 @@ jobs:e2e:name: E2E tests- needs: [changes, lint, build]+ needs: [changes, lint, build, build-api-v1, build-api-v2]if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}uses: ./.github/workflows/e2e.ymlsecrets: inherite2e-app-store:name: E2E App Store tests- needs: [changes, lint, build]+ needs: [changes, lint, build, build-api-v1, build-api-v2]if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}uses: ./.github/workflows/e2e-app-store.ymlsecrets: inherite2e-embed:name: E2E embeds tests- needs: [changes, lint, build]+ needs: [changes, lint, build, build-api-v1, build-api-v2]if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}uses: ./.github/workflows/e2e-embed.ymlsecrets: inherite2e-embed-react:name: E2E React embeds tests- needs: [changes, lint, build]+ needs: [changes, lint, build, build-api-v1, build-api-v2]if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}uses: ./.github/workflows/e2e-embed-react.ymlsecrets: inherit@@ -106,7 +113,7 @@ jobs:secrets: inheritrequired:- needs: [changes, lint, type-check, test, build, build-api-v1, e2e, e2e-embed, e2e-embed-react, e2e-app-store]+ needs: [changes, lint, type-check, test, build, build-api-v1, build-api-v2, e2e, e2e-embed, e2e-embed-react, e2e-app-store]if: always()runs-on: buildjet-2vcpu-ubuntu-2204steps: