-
Notifications
You must be signed in to change notification settings - Fork 11
56 lines (53 loc) · 1.7 KB
/
nighly_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
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: 360
env:
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python
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: ./cairo/.python-version
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Run tests
id: tests
continue-on-error: true # To send a notification if the tests fail
run: |
echo "HYPOTHESIS_PROFILE=nightly" >> .env
cd cairo
uv run compile
forge build
uv run pytest "tests" -m "not NoCI" -n logical --junitxml=junit.xml -o junit_family=legacy
- name: Upload coverage report to codecov
if: steps.tests.outcome == 'success'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/
- 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