From 194c5300ae3d423b18e51c66e54b21bf652231b5 Mon Sep 17 00:00:00 2001 From: Ricardo Pinto Date: Tue, 27 May 2025 10:07:37 +0100 Subject: [PATCH] Re-enabled staging cicd tests ref https://linear.app/ghost/issue/PROD-1779 - Staging `key_value` table had a missing constraint and that was triggering errors in the cloud run job. --- .github/workflows/cicd.yml | 22 +++++++++++----------- src/test/db.ts | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index f27bc64a4..0091ebd17 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -346,17 +346,17 @@ jobs: labels: |- commit-sha=${{ github.sha }} - # - name: "Deploy Tests to Cloud Run" - # if: ${{ matrix.region == 'europe-west4' }} - # uses: google-github-actions/deploy-cloudrun@v2 - # with: - # image: europe-docker.pkg.dev/ghost-activitypub/activitypub/activitypub:${{ needs.build-test-push.outputs.migrations_docker_version }} - # region: ${{ matrix.region }} - # job: stg-${{ matrix.region_name }}-activitypub-tests - # flags: --command="yarn" --args="_test:integration" --wait --execute-now - # skip_default_labels: true - # labels: |- - # commit-sha=${{ github.sha }} + - name: "Deploy Tests to Cloud Run" + if: ${{ matrix.region == 'europe-west4' }} + uses: google-github-actions/deploy-cloudrun@v2 + with: + image: europe-docker.pkg.dev/ghost-activitypub/activitypub/activitypub:${{ needs.build-test-push.outputs.migrations_docker_version }} + region: ${{ matrix.region }} + job: stg-${{ matrix.region_name }}-activitypub-tests + flags: --command="yarn" --args="_test:integration" --wait --execute-now + skip_default_labels: true + labels: |- + commit-sha=${{ github.sha }} - name: "Deploy ActivityPub Queue to Cloud Run" uses: google-github-actions/deploy-cloudrun@v2 diff --git a/src/test/db.ts b/src/test/db.ts index c6c616805..a7301bf58 100644 --- a/src/test/db.ts +++ b/src/test/db.ts @@ -35,7 +35,7 @@ export async function createTestDb() { `SELECT table_name FROM information_schema.tables WHERE table_schema = '${process.env.MYSQL_DATABASE}'`, ); - // Clone each table structure + // Clone each table structure - GCP SQL was having issues with the `CREATE TABLE LIKE` syntax for (const { TABLE_NAME } of tables[0]) { const [createTableResult] = await systemClient.raw( `SHOW CREATE TABLE \`${process.env.MYSQL_DATABASE}\`.\`${TABLE_NAME}\``,