-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (33 loc) · 934 Bytes
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Tests
on:
push:
branches: ["main"]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: aiken-lang/[email protected]
with:
version: v1.0.20-alpha
- run: |
set -o pipefail
aiken check | tee aiken.log
RESULT=$?
if [ $RESULT -ne 0 ]; then
FAILING_TESTS=$(grep "FAIL" aiken.log -A 1)
echo "FAILING_TESTS=$FAILING_TESTS" >> $GITHUB_ENV
exit $RESULT
fi
- run: aiken build
- uses: actions/github-script@v6
if: ${{ 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\`\`\`${{ env.FAILING_TESTS }}`
})