Skip to content

Commit

Permalink
moving continue on error to job level
Browse files Browse the repository at this point in the history
  • Loading branch information
signorecello committed Dec 21, 2023
1 parent b52ad75 commit 89214cf
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 9 deletions.
28 changes: 23 additions & 5 deletions .github/workflows/vite_hardhat_nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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/[email protected]
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/[email protected]
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 }}
27 changes: 23 additions & 4 deletions .github/workflows/with_foundry_nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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/[email protected]
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/[email protected]
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 }}

0 comments on commit 89214cf

Please sign in to comment.