From 717c42989c3fab42fa46457ecfc464b1cbed38ba Mon Sep 17 00:00:00 2001 From: Marcus Aspin Date: Tue, 6 Aug 2024 15:49:19 +0100 Subject: [PATCH] PI-2302 Fix e2e tests in pipeline after switch to GitHub app (#4134) * PI-2302 Fix e2e tests in pipeline after switch to GitHub app * Update CODEOWNERS --- .github/CODEOWNERS | 1 + .github/workflows/pipeline.yml | 30 +++++++++++++++++++----------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index cf7dd1f57b..c41ae68a5d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,4 +1,5 @@ * @ministryofjustice/probation-integration settings.gradle.kts .github/actions +.github/workflows **/Dockerfile \ No newline at end of file diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 91b6b2724c..fc53af4d63 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -27,17 +27,11 @@ jobs: outputs: changes: ${{ steps.merge-changes.outputs.changes }} version: ${{ needs.build.outputs.version }} - app-token: ${{ steps.app-token.outputs.token }} steps: - uses: actions/checkout@v4 - name: Merge changes from the matrix build id: merge-changes uses: ./.github/actions/merge-changes - - uses: actions/create-github-app-token@v1 - id: app-token - with: - app-id: ${{ secrets.BOT_APP_ID }} - private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }} analyse: name: Analyse @@ -73,15 +67,29 @@ jobs: end-to-end-tests: name: Run end-to-end tests - uses: ministryofjustice/hmpps-probation-integration-e2e-tests/.github/workflows/test-remote.yml@main needs: - post-build - deploy-to-test - deploy-to-preprod - with: - projects: ${{ needs.post-build.outputs.changes }} - secrets: - token: ${{ needs.post-build.outputs.app-token }} + runs-on: ubuntu-latest + timeout-minutes: 60 + outputs: + failed-projects: ${{ steps.run.outputs.failed-projects }} + passed-projects: ${{ steps.run.outputs.passed-projects }} + report-url: ${{ steps.run.outputs.report-url }} + steps: + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ secrets.BOT_APP_ID }} + private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }} + repositories: hmpps-probation-integration-e2e-tests + - name: Run tests + id: run + uses: ministryofjustice/hmpps-probation-integration-e2e-tests/.github/actions/run-tests@main + with: + projects: ${{ needs.post-build.outputs.changes }} + token: ${{ steps.app-token.outputs.token }} report-test-failures: name: Failed testing