Skip to content

Commit

Permalink
Merge pull request #746 from sablier-labs/staging
Browse files Browse the repository at this point in the history
Include all 2.1 changes in main
  • Loading branch information
andreivladbrg authored Dec 15, 2023
2 parents c0052ec + ea638be commit b186e72
Show file tree
Hide file tree
Showing 127 changed files with 1,891 additions and 1,443 deletions.
669 changes: 390 additions & 279 deletions .gas-snapshot

Large diffs are not rendered by default.

53 changes: 31 additions & 22 deletions .github/workflows/ci-deep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,27 +68,40 @@ jobs:
steps:
- name: "Check out the repo"
uses: "actions/checkout@v3"
with:
submodules: "recursive"

- name: "Install Foundry"
uses: "foundry-rs/foundry-toolchain@v1"

- name: "Install Pnpm"
uses: "pnpm/action-setup@v2"
with:
version: "8"

- name: "Install Node.js"
uses: "actions/setup-node@v3"
with:
cache: "pnpm"
node-version: "lts/*"

- name: "Install the Node.js dependencies"
run: "pnpm install"

- name: "Show the Foundry config"
run: "forge config"

- name: "Produce an optimized build with --via-ir"
run: "FOUNDRY_PROFILE=optimized forge build"

- name: "Build the test contracts"
run: "FOUNDRY_PROFILE=test-optimized forge build"
run: "FOUNDRY_PROFILE=test-optimized forge build"

- name: "Cache the build so that it can be re-used by the other jobs"
- name: "Cache the build and the node modules so that they can be re-used by the other jobs"
uses: "actions/cache/save@v3"
with:
key: "foundry-build-${{ github.sha }}"
key: "build-and-modules-${{ github.sha }}"
path: |
cache
node_modules
out
out-optimized
Expand All @@ -105,19 +118,18 @@ jobs:
steps:
- name: "Check out the repo"
uses: "actions/checkout@v3"
with:
submodules: "recursive"

- name: "Install Foundry"
uses: "foundry-rs/foundry-toolchain@v1"

- name: "Restore the cached build"
- name: "Restore the cached build and the node modules"
uses: "actions/cache/restore@v3"
with:
fail-on-cache-miss: true
key: "foundry-build-${{ github.sha }}"
key: "build-and-modules-${{ github.sha }}"
path: |
cache
node_modules
out
out-optimized
Expand All @@ -137,19 +149,18 @@ jobs:
steps:
- name: "Check out the repo"
uses: "actions/checkout@v3"
with:
submodules: "recursive"

- name: "Install Foundry"
uses: "foundry-rs/foundry-toolchain@v1"

- name: "Restore the cached build"
- name: "Restore the cached build and the node modules"
uses: "actions/cache/restore@v3"
with:
fail-on-cache-miss: true
key: "foundry-build-${{ github.sha }}"
key: "build-and-modules-${{ github.sha }}"
path: |
cache
node_modules
out
out-optimized
Expand All @@ -170,19 +181,18 @@ jobs:
steps:
- name: "Check out the repo"
uses: "actions/checkout@v3"
with:
submodules: "recursive"

- name: "Install Foundry"
uses: "foundry-rs/foundry-toolchain@v1"

- name: "Restore the cached build"
- name: "Restore the cached build and the node modules"
uses: "actions/cache/restore@v3"
with:
fail-on-cache-miss: true
key: "foundry-build-${{ github.sha }}"
key: "build-and-modules-${{ github.sha }}"
path: |
cache
node_modules
out
out-optimized
Expand All @@ -202,19 +212,18 @@ jobs:
steps:
- name: "Check out the repo"
uses: "actions/checkout@v3"
with:
submodules: "recursive"

- name: "Install Foundry"
uses: "foundry-rs/foundry-toolchain@v1"

- name: "Restore the cached build"
- name: "Restore the cached build and the node modules"
uses: "actions/cache/restore@v3"
with:
fail-on-cache-miss: true
key: "foundry-build-${{ github.sha }}"
key: "build-and-modules-${{ github.sha }}"
path: |
cache
node_modules
out
out-optimized
Expand All @@ -224,4 +233,4 @@ jobs:
- name: "Add test summary"
run: |
echo "## Fork tests result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
83 changes: 83 additions & 0 deletions .github/workflows/ci-slither.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: "CI Slither"

env:
API_KEY_ETHERSCAN: ${{ secrets.API_KEY_ETHERSCAN }}
API_KEY_INFURA: ${{ secrets.API_KEY_INFURA }}
RPC_URL_MAINNET: ${{ secrets.RPC_URL_MAINNET }}

on:
schedule:
- cron: "0 3 * * 0" # at 3:00am UTC every Sunday

jobs:
lint:
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
uses: "actions/checkout@v3"

- name: "Install Foundry"
uses: "foundry-rs/foundry-toolchain@v1"

- name: "Install Pnpm"
uses: "pnpm/action-setup@v2"
with:
version: "8"

- name: "Install Node.js"
uses: "actions/setup-node@v3"
with:
cache: "pnpm"
node-version: "lts/*"

- name: "Install the Node.js dependencies"
run: "pnpm install"

- name: "Lint the contracts"
run: "pnpm lint"

- name: "Add lint summary"
run: |
echo "## Lint result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
slither-analyze:
runs-on: "ubuntu-latest"
permissions:
actions: "read"
contents: "read"
security-events: "write"
steps:
- name: "Check out the repo"
uses: "actions/checkout@v3"

- name: "Install Pnpm"
uses: "pnpm/action-setup@v2"
with:
version: "8"

- name: "Install Node.js"
uses: "actions/setup-node@v3"
with:
cache: "pnpm"
node-version: "lts/*"

- name: "Install the Node.js dependencies"
run: "pnpm install"

- name: "Run Slither analysis"
uses: "crytic/[email protected]"
id: "slither"
with:
fail-on: "none"
sarif: "results.sarif"

- name: "Upload SARIF file to GitHub code scanning"
uses: "github/codeql-action/upload-sarif@v2"
with:
sarif_file: ${{ steps.slither.outputs.sarif }}

- name: "Add Slither summary"
run: |
echo "## Slither result" >> $GITHUB_STEP_SUMMARY
echo "✅ Uploaded to GitHub code scanning" >> $GITHUB_STEP_SUMMARY
Loading

0 comments on commit b186e72

Please sign in to comment.