|
| 1 | +name: "CI Deep" |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: "0 3 * * 3,6" # at 3:00am UTC on Wednesday and Saturday |
| 6 | + workflow_dispatch: |
| 7 | + inputs: |
| 8 | + integrationFuzzRuns: |
| 9 | + default: "100000" |
| 10 | + description: "Integration: number of fuzz runs." |
| 11 | + required: false |
| 12 | + invariantRuns: |
| 13 | + default: "20000" |
| 14 | + description: "Invariant runs: number of sequences of function calls generated and run." |
| 15 | + required: false |
| 16 | + invariantDepth: |
| 17 | + default: "200" |
| 18 | + description: "Invariant depth: number of function calls made in a given run." |
| 19 | + required: false |
| 20 | + forkFuzzRuns: |
| 21 | + default: "20" |
| 22 | + description: "Fork: number of fuzz runs." |
| 23 | + required: false |
| 24 | + |
| 25 | +jobs: |
| 26 | + check: |
| 27 | + uses: "sablier-labs/gha-utils/.github/workflows/full-check.yml@main" |
| 28 | + |
| 29 | + build: |
| 30 | + uses: "sablier-labs/gha-utils/.github/workflows/forge-build.yml@main" |
| 31 | + |
| 32 | + test-integration: |
| 33 | + needs: ["check", "build"] |
| 34 | + uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main" |
| 35 | + with: |
| 36 | + foundry-fuzz-runs: ${{ fromJSON(inputs.integrationFuzzRuns || '100000') }} |
| 37 | + foundry-profile: "test-optimized" |
| 38 | + match-path: "tests/integration/**/*.sol" |
| 39 | + name: "Integration tests" |
| 40 | + |
| 41 | + test-invariant: |
| 42 | + needs: ["check", "build"] |
| 43 | + uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main" |
| 44 | + with: |
| 45 | + foundry-invariant-depth: ${{ fromJSON(inputs.invariantDepth || '200') }} |
| 46 | + foundry-invariant-runs: ${{ fromJSON(inputs.invariantRuns || '20000') }} |
| 47 | + foundry-profile: "test-optimized" |
| 48 | + match-path: "tests/invariant/**/*.sol" |
| 49 | + name: "Invariant tests" |
| 50 | + |
| 51 | + test-fork: |
| 52 | + needs: ["check", "build"] |
| 53 | + secrets: |
| 54 | + MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }} |
| 55 | + ROUTEMESH_API_KEY: ${{ secrets.ROUTEMESH_API_KEY }} |
| 56 | + uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main" |
| 57 | + with: |
| 58 | + foundry-fuzz-runs: ${{ fromJSON(inputs.forkFuzzRuns || '20') }} |
| 59 | + foundry-profile: "test-optimized" |
| 60 | + match-path: "tests/fork/**/*.sol" |
| 61 | + name: "Fork tests" |
| 62 | + retry-attempts: 2 |
| 63 | + |
| 64 | + notify-on-failure: |
| 65 | + if: failure() |
| 66 | + needs: ["check", "build", "test-integration", "test-invariant", "test-fork"] |
| 67 | + runs-on: "ubuntu-latest" |
| 68 | + steps: |
| 69 | + - name: "Send Slack notification" |
| 70 | + uses: "rtCamp/action-slack-notify@v2" |
| 71 | + env: |
| 72 | + SLACK_CHANNEL: "#ci-notifications" |
| 73 | + SLACK_MESSAGE: "CI Workflow failed for ${{ github.repository }} on branch ${{ github.ref }} at job ${{ github.job }}." |
| 74 | + SLACK_USERNAME: "GitHub CI" |
| 75 | + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} |
0 commit comments