From 5555a74d61071f4191e02358a61cd9db18240142 Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Mon, 25 Sep 2023 17:48:39 -0400 Subject: [PATCH] resolved issues --- .github/workflows/ci-build-image.yml | 3 +++ .github/workflows/pr-ci.yml | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build-image.yml b/.github/workflows/ci-build-image.yml index 09c18f24d5..360f4e8d47 100644 --- a/.github/workflows/ci-build-image.yml +++ b/.github/workflows/ci-build-image.yml @@ -14,6 +14,9 @@ on: required: false type: boolean default: false + run-tests-only: + type: boolean + default: false outputs: image-version: description: the Cryostat application version that will be built diff --git a/.github/workflows/pr-ci.yml b/.github/workflows/pr-ci.yml index e6d3fcebcd..a903803834 100644 --- a/.github/workflows/pr-ci.yml +++ b/.github/workflows/pr-ci.yml @@ -76,6 +76,8 @@ jobs: start-comment: runs-on: ubuntu-latest + needs: [check-before-build] + if: ${{ needs.check-before-build.output.result == 'success' }} steps: - name: Capture Date and Time id: date-time @@ -85,9 +87,11 @@ jobs: with: message: | Workflow started at ${{steps.date-time.outputs.date-time}}. + Workflow run [Link](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}). + build-and-test: - needs: [code-analysis, checkout-branch] + needs: [checkout-branch] strategy: matrix: arch: [amd64, arm64] @@ -102,6 +106,7 @@ jobs: checkout-repo: ${{ needs.checkout-branch.outputs.PR_repo }} checkout-ref: ${{ needs.checkout-branch.outputs.PR_head_ref }} skip-itests: ${{ matrix.arch != 'amd64' }} + run-tests-only: true - name: Set BUILD_TEST_EXECUTED flag id: set-build-test-executed run: echo "BUILD_TEST_EXECUTED=true" >> $GITHUB_ENV @@ -118,6 +123,7 @@ jobs: checkout-repo: ${{ needs.checkout-branch.outputs.PR_repo }} checkout-ref: ${{ needs.checkout-branch.outputs.PR_head_ref }} skip-itests: ${{ matrix.arch != 'amd64' }} + run-tests-only: true check-test-results: runs-on: ubuntu-latest @@ -126,7 +132,7 @@ jobs: - name: Check Test Results id: check-results run: | - if [ ... ]; then + if [$? -eq 0]; then echo "Tests passed." echo "::set-output name=test-status::success" else