diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index 8a6eebf..4e0d9ae 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b95f02..68785eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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