-
Notifications
You must be signed in to change notification settings - Fork 14
60 lines (50 loc) · 1.54 KB
/
nightly_fuzzing.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: keth-NIGHTLY-FUZZING
on:
schedule:
- cron: 20 0 * * *
workflow_dispatch: {}
permissions: read-all
jobs:
tests-unit:
runs-on: ubuntu-latest-16-cores
timeout-minutes: 1440
env:
HYPOTHESIS_PROFILE: nightly
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v2
with:
enable-cache: true
cache-dependency-glob: uv.lock
- uses: actions/setup-python@v5
with:
python-version-file: .python-version
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install forge deps
run: forge install
- name: Build solidity contracts
run: forge build
- name: Run tests
id: tests
continue-on-error: true # To send a notification if the tests fail
run: |
cd cairo
uv run compile_os
uv run pytest tests -n logical --durations=0 -v --no-skip-cached-tests
- name: Notify Slack on Failure
if: steps.tests.outcome == 'failure'
uses: slackapi/slack-github-action@v1.24.0
with:
payload: |
{
"text": ":rotating_light: *Keth Nightly Fuzzing Failed!*: <@${{ secrets.SLACK_USER_1 }}> <@${{ secrets.SLACK_USER_2 }}>\n"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: Fail workflow if tests failed
if: steps.tests.outcome == 'failure'
run: exit 1