Skip to content

keth-NIGHTLY-FUZZING #16

keth-NIGHTLY-FUZZING

keth-NIGHTLY-FUZZING #16

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