-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (71 loc) · 2.43 KB
/
scheduled.yaml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Property Testings
on:
schedule:
- cron: "*/2 * * * *"
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
property-testing:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
clarity_version: [1, 2, 3]
name: Clarity::V${{ matrix.clarity_version }} Property Tests
env:
PROPTEST_CASES: 2
steps:
- name: Checkout PR
uses: actions/checkout@v4
- name: Use Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Run Tests
run: |
set +e
cargo nextest run \
--features test-clarity-v${{ matrix.clarity_version }} \
--test wasm-generation \
--test standard 2>&1| tee output.log
test_exit=${PIPESTATUS[0]}
echo "output.log: $(cat output.log)"
sed -n '/Test failed: assertion/,/Canceling due to test failure/p' output.log >> failure_section.log
echo "failure_section<<EOF" >> $GITHUB_ENV
cat failure_section.log >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
if [ $test_exit -ne 0 ]; then
exit 101
fi
- name: Create GitHub Issue on Failure
uses: jayqi/failed-build-issue-action@v1
if: ${{ failure() }}
with:
github-token: ${{ secrets.GH_TOKEN }}
label-name: "property-testing-failure"
title-template: "Property testing failure"
body-template: |
GitHub Actions workflow [{{workflow}} #{{runNumber}}](https://github.com/{{repo.owner}}/{{repo.repo}}/actions/runs/{{runId}}) failed.
```log
${{ env.failure_section }}
```
- name: Send message to Slack
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
if: ${{ failure() }}
with:
channel-id: ${{ secrets.CHANNEL_ID }}
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "GitHub Actions workflow <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|Property Testing #${{ github.run_number }}> failed."
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}