Final commit for mainnet launch. #211
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.26-alpha | |
- run: | | |
# Run the tests | |
set -o pipefail | |
RESULT=0 | |
aiken check -t silent 2>&1 || RESULT=$? | |
if [ $RESULT -ne 0 ]; then | |
aiken check 2>&1 | tee aiken.log | |
{ | |
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\`\`\`` | |
}) |