diff --git a/.github/workflows/test-podman-compose.yml b/.github/workflows/test-podman-compose.yml index b64aa69fe63..c1ae9e1445d 100644 --- a/.github/workflows/test-podman-compose.yml +++ b/.github/workflows/test-podman-compose.yml @@ -111,8 +111,10 @@ jobs: make install > /dev/null - name: Run Fluent test script + id: fluent_test run: | python tests/podman_compose.py + continue-on-error: true - name: Cleanup previous containers if: always() @@ -121,13 +123,9 @@ jobs: sudo podman system prune -af - name: Send GitHub Actions Run Status Adaptive Card to Teams via Power Automate - if: github.event_name == 'schedule' && job.status != 'success' + if: github.event_name == 'schedule' && steps.fluent_test.outcome != 'success' run: | # zizmor: ignore[template-injection] - STATUS="Success" - if [ "${{ job.status }}" != "success" ]; then - STATUS="Failure" - fi - + STATUS="Failure" RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" COMMIT_URL="https://github.com/${{ github.repository }}/commit/${{ github.sha }}" diff --git a/.github/workflows/test-run-dev-version-nightly.yml b/.github/workflows/test-run-dev-version-nightly.yml index 9ecdf57fee4..78f80aa6b0e 100644 --- a/.github/workflows/test-run-dev-version-nightly.yml +++ b/.github/workflows/test-run-dev-version-nightly.yml @@ -88,12 +88,14 @@ jobs: make install > /dev/null - name: Unit Testing + id: unittest run: | make install-test make unittest-all-${VERSION} env: VERSION: ${{ env.FLUENT_VERSION }} FLUENT_IMAGE_TAG: ${{ env.FLUENT_IMAGE_TAG }} + continue-on-error: true - name: Cleanup previous docker containers if: always() @@ -103,7 +105,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.ADMIN_ACCESS_TOKEN }} IMAGE_TAG: ${{ env.FLUENT_IMAGE_TAG }} - if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/main' && steps.unittest.outcome == 'success' run: | DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' ghcr.io/ansys/fluent:${IMAGE_TAG} | sed 's/.*@//') gh variable set FLUENT_STABLE_IMAGE_DEV --body $DIGEST @@ -113,13 +115,9 @@ jobs: run: make docker-clean-images - name: Send GitHub Actions Run Status Adaptive Card to Teams via Power Automate - if: github.event_name == 'schedule' && job.status != 'success' + if: github.event_name == 'schedule' && steps.fluent_test.outcome != 'success' run: | # zizmor: ignore[template-injection] - STATUS="Success" - if [ "${{ job.status }}" != "success" ]; then - STATUS="Failure" - fi - + STATUS="Failure" RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" COMMIT_URL="https://github.com/${{ github.repository }}/commit/${{ github.sha }}" diff --git a/doc/changelog.d/4560.maintenance.md b/doc/changelog.d/4560.maintenance.md new file mode 100644 index 00000000000..d15f78ad89c --- /dev/null +++ b/doc/changelog.d/4560.maintenance.md @@ -0,0 +1 @@ +Fix notifications [skip tests] diff --git a/doc/changelog.d/4561.maintenance.md b/doc/changelog.d/4561.maintenance.md new file mode 100644 index 00000000000..ce62f86f7e7 --- /dev/null +++ b/doc/changelog.d/4561.maintenance.md @@ -0,0 +1 @@ +Notify only when job fails diff --git a/doc/changelog.d/4562.maintenance.md b/doc/changelog.d/4562.maintenance.md new file mode 100644 index 00000000000..ce62f86f7e7 --- /dev/null +++ b/doc/changelog.d/4562.maintenance.md @@ -0,0 +1 @@ +Notify only when job fails