Skip to content

ci: add nightly fuzzing job #4

ci: add nightly fuzzing job

ci: add nightly fuzzing job #4

Workflow file for this run

name: keth-NIGHTLY-FUZZING
on:
schedule:
- cron: 20 0 * * *
push:
pull_request:
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: Compile Solidity contracts
run: |
forge build
- name: Install dependencies
run: |
uv sync --all-extras --dev
- name: Run tests
id: tests
continue-on-error: true # To send a notification if the tests fail
run: |
echo "HYPOTHESIS_PROFILE=nightly" >> .env
uv run pytest "cairo/tests" -m "not NoCI" -n logical --seed 42
- 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": "🚨 Keth Nightly Fuzzing Failed!",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Nightly Fuzzing Tests Failed*\n\n• Workflow: ${{ github.workflow }}\n• Commit: ${{ github.sha }}\n• Branch: ${{ github.ref_name }}"
}
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "View Run"
},
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}