Skip to content

Commit

Permalink
Add checks
Browse files Browse the repository at this point in the history
  • Loading branch information
as3810t committed Nov 19, 2024
1 parent 2259554 commit e30a998
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check
filter_mode: nofilter
filter_mode: added
prettier:
name: Prettier
runs-on: ubuntu-latest
Expand All @@ -41,7 +41,7 @@ jobs:
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-check
filter_mode: nofilter
filter_mode: added
prettier_flags: '**/*.{js,sol,ts,json,jsx,tsx}'
solhint:
name: Solhint
Expand All @@ -64,7 +64,7 @@ jobs:
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npx solhint -f sarif 'contracts/**/*.sol' | reviewdog -f=sarif -reporter=github-pr-check -level=error -fail-level=none -filter-mode=nofilter -name=solhint
npx solhint -f sarif 'contracts/**/*.sol' | reviewdog -f=sarif -reporter=github-pr-check -level=error -fail-level=none -filter-mode=added -name=solhint
coverage:
name: Coverage
runs-on: ubuntu-latest
Expand Down
63 changes: 62 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,68 @@ jobs:
if: ${{ failure() && steps.run_tests.outcome == 'failure' }}
run: |
echo "❌ Failed" >> $GITHUB_STEP_SUMMARY
eslint:
name: ESLint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run ESLint
uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-check
filter_mode: nofilter
level: info
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- uses: EPMatt/reviewdog-action-prettier@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-check
filter_mode: nofilter
prettier_flags: '**/*.{js,sol,ts,json,jsx,tsx}'
level: info
solhint:
name: Solhint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Setup reviewdog
uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest
- name: Run solhint
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npx solhint -f sarif 'contracts/**/*.sol' | reviewdog -f=sarif -reporter=github-check -level=info -fail-level=none -filter-mode=nofilter -name=solhint
slither:
name: Slither
runs-on: ubuntu-latest
Expand Down

0 comments on commit e30a998

Please sign in to comment.