From 0d61209b8d22ecd38b6bb3e93831f4004dd0c944 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 21 Jan 2025 12:09:45 +0200 Subject: [PATCH] Run the integration tests on main Signed-off-by: Radoslav Dimitrov --- .github/workflows/run-on-pr.yml | 1 + .github/workflows/run-on-push.yml | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-on-pr.yml b/.github/workflows/run-on-pr.yml index 09457aaa..7f82424d 100644 --- a/.github/workflows/run-on-pr.yml +++ b/.github/workflows/run-on-pr.yml @@ -20,6 +20,7 @@ jobs: with: artifact-name: "codegate-image" integration-tests: + if: github.event.pull_request.head.repo.full_name == 'stacklok/codegate' name: Integration Tests needs: [ci, image-build] # We need the image available in order to run the integration tests uses: ./.github/workflows/integration-tests.yml diff --git a/.github/workflows/run-on-push.yml b/.github/workflows/run-on-push.yml index a50c7082..9525ef2c 100644 --- a/.github/workflows/run-on-push.yml +++ b/.github/workflows/run-on-push.yml @@ -13,7 +13,21 @@ jobs: ci: name: Build, Test & Lint uses: ./.github/workflows/ci.yml + image-build: + name: OCI Image - Build + needs: [ci] # No need to build the image if the CI fails + uses: ./.github/workflows/image-build.yml + with: + artifact-name: "codegate-image" + integration-tests: + name: Integration Tests + needs: [ci, image-build] # We need the image available in order to run the integration tests + uses: ./.github/workflows/integration-tests.yml + with: + artifact-name: "codegate-image" + secrets: + copilot-key: ${{ secrets.INTEGRATION_TESTS_COPILOT_KEY }} openapi: name: Generate the OpenAPI docs needs: [ci] - uses: ./.github/workflows/openapi.yml + uses: ./.github/workflows/openapi.yml