Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 7 additions & 50 deletions .github/workflows/ci-airdrops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
pull_request:
paths:
- ".github/workflows/ci-airdrops.yml"
- ".github/workflows/ci-module.yml"
- "airdrops/**"
- "foundry.base.toml"
- "package.json"
Expand All @@ -19,59 +20,15 @@ on:
- "staging"
paths:
- ".github/workflows/ci-airdrops.yml"
- ".github/workflows/ci-module.yml"
- "airdrops/**"
- "foundry.base.toml"
- "package.json"

jobs:
check:
uses: "sablier-labs/gha-utils/.github/workflows/full-check.yml@main"
ci:
uses: "./.github/workflows/ci-module.yml"
secrets: inherit
with:
foundry-version: "stable"

build:
uses: "sablier-labs/gha-utils/.github/workflows/forge-build.yml@main"
with:
foundry-version: "stable"

test-bulloak:
needs: ["check", "build"]
if: needs.build.outputs.cache-status != 'primary'
uses: "sablier-labs/gha-utils/.github/workflows/bulloak-check.yml@main"
with:
skip-modifiers: true
test-dir: "tests"

test-integration:
needs: ["check", "build"]
if: needs.build.outputs.cache-status != 'primary'
uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main"
with:
foundry-fuzz-runs: 2000
foundry-profile: "test-optimized"
foundry-version: "stable"
match-path: "airdrops/tests/integration/**/*.sol"
name: "Integration tests"

test-fork:
needs: ["check", "build"]
if: needs.build.outputs.cache-status != 'primary'
secrets:
ROUTEMESH_API_KEY: ${{ secrets.ROUTEMESH_API_KEY }}
uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main"
with:
foundry-fuzz-runs: 20
foundry-profile: "test-optimized"
foundry-version: "stable"
match-path: "airdrops/tests/fork/**/*.sol"
name: "Fork tests"

coverage:
needs: ["check", "build"]
if: needs.build.outputs.cache-status != 'primary'
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
uses: "sablier-labs/gha-utils/.github/workflows/forge-coverage.yml@main"
with:
foundry-version: "stable"
match-path: "airdrops/tests/{integration,unit}/**/*.sol"
exclude-invariant-tests: true
module: "airdrops"
67 changes: 7 additions & 60 deletions .github/workflows/ci-flow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
pull_request:
paths:
- ".github/workflows/ci-flow.yml"
- ".github/workflows/ci-module.yml"
- "flow/**"
- "foundry.base.toml"
- "package.json"
Expand All @@ -19,69 +20,15 @@ on:
- "staging"
paths:
- ".github/workflows/ci-flow.yml"
- ".github/workflows/ci-module.yml"
- "flow/**"
- "foundry.base.toml"
- "package.json"

jobs:
check:
uses: "sablier-labs/gha-utils/.github/workflows/full-check.yml@main"
ci:
uses: "./.github/workflows/ci-module.yml"
secrets: inherit
with:
foundry-version: "stable"

build:
uses: "sablier-labs/gha-utils/.github/workflows/forge-build.yml@main"
with:
foundry-version: "stable"
test-bulloak:
needs: ["check", "build"]
if: needs.build.outputs.cache-status != 'primary'
uses: "sablier-labs/gha-utils/.github/workflows/bulloak-check.yml@main"
with:
skip-modifiers: true
test-dir: "tests/integration"
test-integration:
needs: ["check", "build"]
if: needs.build.outputs.cache-status != 'primary'
uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main"
with:
foundry-fuzz-runs: 10000
foundry-profile: "test-optimized"
foundry-version: "stable"
match-path: "flow/tests/integration/**/*.sol"
name: "Integration tests"

test-invariant:
needs: ["check", "build"]
if: needs.build.outputs.cache-status != 'primary'
uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main"
with:
foundry-invariant-depth: 100
foundry-invariant-runs: 1000
foundry-profile: "test-optimized"
foundry-version: "stable"
match-path: "flow/tests/invariant/**/*.sol"
name: "Invariant tests"

test-fork:
needs: ["check", "build"]
if: needs.build.outputs.cache-status != 'primary'
secrets:
ROUTEMESH_API_KEY: ${{ secrets.ROUTEMESH_API_KEY }}
uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main"
with:
foundry-fuzz-runs: 20
foundry-profile: "test-optimized"
foundry-version: "stable"
match-path: "flow/tests/fork/**/*.sol"
name: "Fork tests"

coverage:
needs: ["check", "build"]
if: needs.build.outputs.cache-status != 'primary'
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
uses: "sablier-labs/gha-utils/.github/workflows/forge-coverage.yml@main"
with:
foundry-version: "stable"
match-path: "flow/tests/integration/**/*.sol"
exclude-unit-tests: true
module: "flow"
77 changes: 6 additions & 71 deletions .github/workflows/ci-lockup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
pull_request:
paths:
- ".github/workflows/ci-lockup.yml"
- ".github/workflows/ci-module.yml"
- "lockup/**"
- "foundry.base.toml"
- "package.json"
Expand All @@ -19,80 +20,14 @@ on:
- "staging"
paths:
- ".github/workflows/ci-lockup.yml"
- ".github/workflows/ci-module.yml"
- "lockup/**"
- "foundry.base.toml"
- "package.json"

jobs:
check:
uses: "sablier-labs/gha-utils/.github/workflows/full-check.yml@main"
ci:
uses: "./.github/workflows/ci-module.yml"
secrets: inherit
with:
foundry-version: "stable"

build:
uses: "sablier-labs/gha-utils/.github/workflows/forge-build.yml@main"
with:
foundry-version: "stable"

test-bulloak:
needs: ["check", "build"]
if: needs.build.outputs.cache-status != 'primary'
uses: "sablier-labs/gha-utils/.github/workflows/bulloak-check.yml@main"
with:
skip-modifiers: true
test-dir: "tests"

test-unit:
needs: ["check", "build"]
if: needs.build.outputs.cache-status != 'primary'
uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main"
with:
foundry-fuzz-runs: 2000
foundry-profile: "test-optimized"
foundry-version: "stable"
match-path: "lockup/tests/unit/**/*.sol"
name: "Unit tests"

test-integration:
needs: ["check", "build"]
if: needs.build.outputs.cache-status != 'primary'
uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main"
with:
foundry-fuzz-runs: 2000
foundry-profile: "test-optimized"
foundry-version: "stable"
match-path: "lockup/tests/integration/**/*.sol"
name: "Integration tests"

test-invariant:
needs: ["check", "build"]
if: needs.build.outputs.cache-status != 'primary'
uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main"
with:
foundry-profile: "test-optimized"
foundry-version: "stable"
match-path: "lockup/tests/invariant/**/*.sol"
name: "Invariant tests"

test-fork:
needs: ["check", "build"]
if: needs.build.outputs.cache-status != 'primary'
secrets:
ROUTEMESH_API_KEY: ${{ secrets.ROUTEMESH_API_KEY }}
uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main"
with:
foundry-fuzz-runs: 20
foundry-profile: "test-optimized"
foundry-version: "stable"
match-path: "lockup/tests/fork/**/*.sol"
name: "Fork tests"

coverage:
needs: ["check", "build"]
if: needs.build.outputs.cache-status != 'primary'
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
uses: "sablier-labs/gha-utils/.github/workflows/forge-coverage.yml@main"
with:
foundry-version: "stable"
match-path: "lockup/tests/{integration,unit}/**/*.sol"
module: "lockup"
137 changes: 137 additions & 0 deletions .github/workflows/ci-module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
name: "CI: Module (Reusable)"

on:
workflow_call:
inputs:
exclude-invariant-tests:
default: false
required: false
type: boolean
exclude-unit-tests:
default: false
required: false
type: boolean
module:
description: "Module name (e.g., airdrops, flow, lockup, utils)"
required: true
type: string
secrets:
CODECOV_TOKEN:
required: false
ROUTEMESH_API_KEY:
required: false

jobs:
check:
uses: "sablier-labs/gha-utils/.github/workflows/full-check.yml@main"
with:
foundry-version: "v1.4.4"
name: "Full check"
working-directory: ${{ inputs.module }}

build:
uses: "sablier-labs/gha-utils/.github/workflows/forge-build.yml@main"
with:
cache-path: |
${{ inputs.module }}/cache
${{ inputs.module }}/node_modules
${{ inputs.module }}/out
${{ inputs.module }}/out-optimized
foundry-version: "v1.4.4"
name: "Build"
working-directory: ${{ inputs.module }}

test-bulloak:
needs: ["build", "check"]
if: needs.build.outputs.cache-status != 'primary'
uses: "sablier-labs/gha-utils/.github/workflows/bulloak-check.yml@main"
with:
name: "Bulloak check"
skip-modifiers: true
test-dir: "${{ inputs.module }}/tests"
working-directory: ${{ inputs.module }}

test-fork:
needs: ["build", "check"]
if: needs.build.outputs.cache-status != 'primary'
secrets:
ROUTEMESH_API_KEY: ${{ secrets.ROUTEMESH_API_KEY }}
uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main"
with:
cache-path: |
${{ inputs.module }}/cache
${{ inputs.module }}/node_modules
${{ inputs.module }}/out
${{ inputs.module }}/out-optimized
foundry-fuzz-runs: 20
foundry-profile: "test-optimized"
foundry-version: "v1.4.4"
match-path: "tests/fork/**/*.sol"
name: "Fork tests"
working-directory: ${{ inputs.module }}

test-integration:
needs: ["build", "check"]
if: needs.build.outputs.cache-status != 'primary'
uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main"
with:
cache-path: |
${{ inputs.module }}/cache
${{ inputs.module }}/node_modules
${{ inputs.module }}/out
${{ inputs.module }}/out-optimized
foundry-profile: "test-optimized"
foundry-version: "v1.4.4"
match-path: "tests/{integration,utils}/**/*.sol"
name: "Integration tests"
working-directory: ${{ inputs.module }}

test-invariant:
needs: ["build", "check"]
if: needs.build.outputs.cache-status != 'primary' && !inputs.exclude-invariant-tests
uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main"
with:
cache-path: |
${{ inputs.module }}/cache
${{ inputs.module }}/node_modules
${{ inputs.module }}/out
${{ inputs.module }}/out-optimized
foundry-profile: "test-optimized"
foundry-version: "v1.4.4"
match-path: "tests/invariant/**/*.sol"
name: "Invariant tests"
working-directory: ${{ inputs.module }}

test-unit:
needs: ["build", "check"]
if: needs.build.outputs.cache-status != 'primary' && !inputs.exclude-unit-tests
uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main"
with:
cache-path: |
${{ inputs.module }}/cache
${{ inputs.module }}/node_modules
${{ inputs.module }}/out
${{ inputs.module }}/out-optimized
foundry-profile: "test-optimized"
foundry-version: "v1.4.4"
match-path: "tests/unit/**/*.sol"
name: "Unit tests"
working-directory: ${{ inputs.module }}

coverage:
needs: ["build", "check", "test-integration"]
if: needs.build.outputs.cache-status != 'primary'
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
uses: "sablier-labs/gha-utils/.github/workflows/forge-coverage.yml@main"
with:
cache-path: |
${{ inputs.module }}/cache
${{ inputs.module }}/node_modules
${{ inputs.module }}/out
${{ inputs.module }}/out-optimized
foundry-version: "v1.4.4"
match-path: "tests/{integration,unit}/**/*.sol"
name: "Coverage"
via-ir-minimum: true
working-directory: ${{ inputs.module }}
Loading