generated from smartcontractkit/foundry-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35ebbe7
commit bf1b67e
Showing
2 changed files
with
41 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,36 +2,43 @@ name: Quality Gate | |
on: | ||
push: | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
concurrency: | ||
group: quality-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
packages: read | ||
|
||
jobs: | ||
build_and_validate: | ||
lint: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: read | ||
security-events: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up environment | ||
uses: ./.github/actions/setup | ||
- name: code quality | ||
run: make lint | ||
- name: Run harhat compilation | ||
run: make compile | ||
- name: Run unit tests | ||
run: make test | ||
- name: Run demo deployment | ||
run: make deploy | ||
- name: Run Slither | ||
uses: crytic/[email protected] | ||
id: slither | ||
with: | ||
target: 'src/' | ||
sarif: results.sarif | ||
fail-on: none | ||
ignore-compile: true | ||
- name: Upload SARIF file | ||
uses: github/codeql-action/upload-sarif@v2 | ||
- uses: ./.github/actions/setup | ||
- run: make lint | ||
|
||
check-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup | ||
- run: make compile | ||
- run: make deploy | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup | ||
- run: make test | ||
|
||
slither: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup | ||
- run: rm foundry.toml | ||
- uses: crytic/[email protected] | ||
with: | ||
sarif_file: ${{ steps.slither.outputs.sarif }} | ||
node-version: 18.15 |