Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci): notify discord of successfull flaky runs #2623

Merged
merged 8 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
Loading