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

Report failing tests to the PR #63

Merged
merged 21 commits into from
Feb 12, 2024
Merged
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
28 changes: 27 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,31 @@ jobs:
with:
version: v1.0.20-alpha

- run: aiken check
- run: |
# Run the tests
set -o pipefail
RESULT=0
aiken check 2>&1 | tee aiken.log || RESULT=$?
if [ $RESULT -ne 0 ]; then
{
echo 'FAILING_TESTS<<EOF'
grep "FAIL" aiken.log
echo EOF
} >> "$GITHUB_ENV"
cat $GITHUB_ENV
exit $RESULT
fi
- if: failure()
run: |
echo "$FAILING_TESTS"
- run: aiken build
- uses: actions/github-script@v6
if: failure() && env.FAILING_TESTS != ''
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Tests failed:\n\n\`\`\`\n${{ env.FAILING_TESTS }}\n\`\`\``
})
Loading