diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 881a3d6..3248848 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,23 +124,35 @@ jobs: echo "✅ Passed or warnings found" >> $GITHUB_STEP_SUMMARY fi - # slither-analyze: - # runs-on: ubuntu-latest - # permissions: - # contents: read - # security-events: write - # steps: - # - uses: actions/checkout@v3 - - # - name: Run Slither - # uses: crytic/slither-action@v0.3.0 - # id: slither # Required to reference this step in the next step. - # with: - # fail-on: none # Required to avoid failing the CI run regardless of findings. - # sarif: results.sarif - # slither-args: --filter-paths "./lib|./test" --exclude naming-convention,solc-version - - # - name: Upload SARIF file - # uses: github/codeql-action/upload-sarif@v2 - # with: - # sarif_file: ${{ steps.slither.outputs.sarif }} + slither-analyze: + runs-on: "ubuntu-latest" + permissions: + actions: "read" + contents: "read" + security-events: "write" + steps: + - name: "Check out the repo" + uses: "actions/checkout@v4" + + - name: "Install Bun" + uses: "oven-sh/setup-bun@v1" + + - name: "Install the Node.js dependencies" + run: "bun install --frozen-lockfile" + + - name: "Run Slither analysis" + uses: "crytic/slither-action@v0.3.0" + 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 summary" + run: | + echo "## Slither result" >> $GITHUB_STEP_SUMMARY + echo "✅ Uploaded to GitHub code scanning" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 9b98781..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: "Lint" - -env: - FOUNDRY_PROFILE: "ci" - -on: - workflow_dispatch: - push: - branches: - - "main" - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - name: "Check out the repo" - uses: actions/checkout@v3 - with: - submodules: recursive - - name: "Install Node.js" - uses: actions/setup-node@v3 - with: - node-version: lts/* - - - name: "Install the Node.js dependencies" - run: npm install - - - name: Run linter and check for errors - id: lint - run: | - LINT_OUTCOME=$(npm run lint 2>&1 || true) # Prevent the step from failing immediately - echo "$LINT_OUTCOME" - echo "LINT_OUTCOME<> $GITHUB_ENV - echo "$LINT_OUTCOME" >> $GITHUB_ENV - echo "EOF" >> $GITHUB_ENV - if echo "$LINT_OUTCOME" | grep -q " error "; then - echo "## Lint result" >> $GITHUB_STEP_SUMMARY - echo "❌ Failed due to errors" >> $GITHUB_STEP_SUMMARY - exit 1 - else - echo "## Lint result" >> $GITHUB_STEP_SUMMARY - echo "✅ Passed or warnings found" >> $GITHUB_STEP_SUMMARY - fi diff --git a/.github/workflows/slither-analyze.yml b/.github/workflows/slither-analyze.yml deleted file mode 100644 index 24b6b79..0000000 --- a/.github/workflows/slither-analyze.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: "Slither Analyze" - -on: - workflow_dispatch: - push: - branches: - - "main" - -jobs: - slither-analyze: - runs-on: "ubuntu-latest" - permissions: - actions: "read" - contents: "read" - security-events: "write" - steps: - - name: "Check out the repo" - uses: "actions/checkout@v4" - - - name: "Install Bun" - uses: "oven-sh/setup-bun@v1" - - - name: "Install the Node.js dependencies" - run: "bun install --frozen-lockfile" - - - name: "Run Slither analysis" - uses: "crytic/slither-action@v0.3.0" - 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 summary" - run: | - echo "## Slither result" >> $GITHUB_STEP_SUMMARY - echo "✅ Uploaded to GitHub code scanning" >> $GITHUB_STEP_SUMMARY