Skip to content

Commit

Permalink
feat(ci): notify discord of successfull flaky runs (#2623)
Browse files Browse the repository at this point in the history
## Description

In pro of being a bit more positive, this PR makes the notify action
tell us when there were no ci failures as well.

## Breaking Changes
n/a

## Notes & open questions

Also increases the required threads for the isolation tests

## Change checklist

- [x] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
  • Loading branch information
divagant-martian authored Aug 14, 2024
1 parent 74a527b commit 94cee34
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[test-groups]
run-in-isolation = { max-threads = 16 }
run-in-isolation = { max-threads = 32 }
# these are tests that must not run with other tests concurrently. All tests in
# this group can take up at most 16 threads among them, but each one requiring
# this group can take up at most 32 threads among them, but each one requiring
# 16 threads also. The effect should be that tests run isolated.

[[profile.ci.overrides]]
filter = 'test(::run_in_isolation::)'
test-group = 'run-in-isolation'
threads-required = 16
threads-required = 32
15 changes: 7 additions & 8 deletions .github/workflows/flaky.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ jobs:
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
EOF=aP51VriWCxNJ1JjvmO9i
echo "summary<<$EOF" >> $GITHUB_OUTPUT
echo "Flaky tests failure:" >> $GITHUB_OUTPUT
echo " " >> $GITHUB_OUTPUT
for report in nextest-results/*.json; do
# remove the name prefix and extension, and split the parts
name=$(echo ${report:16:-5} | tr _ ' ')
Expand All @@ -84,16 +86,13 @@ jobs:
echo "$failure"
echo "$failure" >> $GITHUB_OUTPUT
done
echo "" >> $GITHUB_OUTPUT
echo "See /~https://github.com/n0-computer/iroh/actions/workflows/flaky.yaml" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
- name: Notify discord on failure
uses: n0-computer/discord-webhook-notify@v1
if: ${{ env.TESTS_RESULT == 'failure' }}
if: ${{ env.TESTS_RESULT != 'cancelled' }}
with:
severity: warn
details: |
Flaky tests failure:
${{ steps.make_summary.outputs.summary }}
See /~https://github.com/n0-computer/iroh/actions/workflows/flaky.yaml
severity: ${{ env.TESTS_RESULT == 'failure' && 'warn' || 'info' }}
details: ${{ env.TESTS_RESULT == 'failure' && steps.make_summary.outputs.summary || 'No flaky failures!' }}
webhookUrl: ${{ secrets.DISCORD_N0_GITHUB_CHANNEL_WEBHOOK_URL }}

0 comments on commit 94cee34

Please sign in to comment.