From 89214cfc5b230fdcceb1b1b6392f98eb1d26dab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Pedro=20Sousa?= Date: Thu, 21 Dec 2023 13:11:08 +0000 Subject: [PATCH] moving continue on error to job level --- .github/workflows/vite_hardhat_nightly.yaml | 28 +++++++++++++++++---- .github/workflows/with_foundry_nightly.yaml | 27 +++++++++++++++++--- 2 files changed, 46 insertions(+), 9 deletions(-) diff --git a/.github/workflows/vite_hardhat_nightly.yaml b/.github/workflows/vite_hardhat_nightly.yaml index d1c224b..c0fb8e1 100644 --- a/.github/workflows/vite_hardhat_nightly.yaml +++ b/.github/workflows/vite_hardhat_nightly.yaml @@ -44,6 +44,10 @@ jobs: fail-fast: false matrix: version: ${{ fromJson(needs.vite-hardhat-setup.outputs.versions) }} + # if it errors, we still need to know about it! + continue-on-error: true + outputs: + is_stable: ${{ steps.get-stability.outputs.is_stable }} steps: - uses: actions/checkout@v4 @@ -98,16 +102,30 @@ jobs: - name: Run test run: yarn test id: yarn_test - continue-on-error: ${{ steps.get-stability.outputs.is_stable == 'false' }} - - name: Send GitHub Action trigger data to Slack workflow - id: slack + notify: + needs: vite-hardhat-test-drift + runs-on: ubuntu-latest + if: ${{ needs.vite-hardhat-test-drift.result == 'failure' }} + steps: + - name: Send GitHub Action trigger data to Slack workflow - Stable + uses: slackapi/slack-github-action@v1.24.0 + if: ${{ needs.vite-hardhat-test-drift.outputs.is_stable == 'true' }} + with: + payload: | + { + "text": "Oooops, seems like latest stable Noir breaks noir-starter! Projects needing updating: vite-hardhat ${{ matrix.version }}" + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + + - name: Send GitHub Action trigger data to Slack workflow - Prerelease uses: slackapi/slack-github-action@v1.24.0 - if: ${{ failure() && steps.get-stability.outputs.is_stable == 'false' }} + if: ${{ needs.vite-hardhat-test-drift.outputs.is_stable == 'false' }} with: payload: | { - "text": "Once the prerelease becomes stable, projects need updating: vite-hardhat ${{ matrix.version }}" + "text": "Heads up DevRel! Once the prerelease becomes stable, the following project will break: vite-hardhat ${{ matrix.version }}" } env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/with_foundry_nightly.yaml b/.github/workflows/with_foundry_nightly.yaml index ceb7b2e..7b76ad3 100644 --- a/.github/workflows/with_foundry_nightly.yaml +++ b/.github/workflows/with_foundry_nightly.yaml @@ -43,6 +43,10 @@ jobs: fail-fast: false matrix: version: ${{ fromJson(needs.with-foundry-setup.outputs.versions) }} + # if it errors, we still need to know about it! + continue-on-error: true + outputs: + is_stable: ${{ steps.get-stability.outputs.is_stable }} steps: - uses: actions/checkout@v4 @@ -99,14 +103,29 @@ jobs: run: | forge test --optimize --optimizer-runs 5000 --evm-version london - - name: Send GitHub Action trigger data to Slack workflow - id: slack + notify: + needs: with-foundry-test-drift + runs-on: ubuntu-latest + if: ${{ needs.with-foundry-test-drift.result == 'failure' }} + steps: + - name: Send GitHub Action trigger data to Slack workflow - Stable + uses: slackapi/slack-github-action@v1.24.0 + if: ${{ needs.with-foundry-test-drift.outputs.is_stable == 'true' }} + with: + payload: | + { + "text": "Oooops, seems like latest stable Noir breaks noir-starter! Projects needing updating: with-foundry ${{ matrix.version }}" + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + + - name: Send GitHub Action trigger data to Slack workflow - Prerelease uses: slackapi/slack-github-action@v1.24.0 - if: ${{ failure() && steps.get-stability.outputs.is_stable == 'false' }} + if: ${{ needs.with-foundry-test-drift.outputs.is_stable == 'false' }} with: payload: | { - "text": "Once the prerelease becomes stable, projects need updating: with-foundry ${{ matrix.version }}" + "text": "Heads up DevRel! Once the prerelease becomes stable, the following project will break: with-foundry ${{ matrix.version }}" } env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}