From c2c5892ee3f44d21eb29bbc190f50cea18276cbd Mon Sep 17 00:00:00 2001 From: zeroknots Date: Fri, 16 Feb 2024 12:29:46 +0700 Subject: [PATCH] feat: reusable ci --- .github/workflows/ci.yaml | 19 +++++++++++++++++++ .github/workflows/forge-build.yaml | 22 ++++++++++++++++++++-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..226f8a84 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,19 @@ +on: + - push + - pull_request + +jobs: + lint: + uses: "rhinestonewtf/reusable-workflows/.github/workflows/forge-lint.yaml@main" + + build: + uses: "rhinestonewtf/reusable-workflows/.github/workflows/forge-build.yaml@main" + + test-unit: + needs: ["lint", "build"] + uses: "sablier-labs/reusable-workflows/.github/workflows/forge-test.yml@main" + with: + foundry-fuzz-runs: 5000 + foundry-profile: "test-optimized" + match-path: "test/**/*.sol" + name: "Unit tests" diff --git a/.github/workflows/forge-build.yaml b/.github/workflows/forge-build.yaml index 119a6379..91c32573 100644 --- a/.github/workflows/forge-build.yaml +++ b/.github/workflows/forge-build.yaml @@ -1,8 +1,26 @@ name: "Build a Forge project" on: - - push - - pull_request + workflow_call: + inputs: + cache-path: + default: | + cache + node_modules + out + out-optimized + required: false + type: "string" + + save-cache: + default: true + required: false + type: boolean + + store-artifacts: + default: true + required: false + type: boolean jobs: forge-build: