Skip to content

Commit

Permalink
Sonar configuration fix
Browse files Browse the repository at this point in the history
  • Loading branch information
icyfry committed Jan 30, 2024
1 parent 6e20c78 commit b28f16e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
27 changes: 12 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@master
with:
submodules: recursive
- name: Install Foundry
Expand All @@ -46,12 +46,17 @@ jobs:
working-directory: dapp
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: actions/setup-node@master
with:
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
run_install: false
node-version: 20
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
Expand All @@ -64,17 +69,9 @@ jobs:
- name: Build and tests
run: |
pnpm run build
pnpm run coverage
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
pnpm run coverage
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
7 changes: 4 additions & 3 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
sonar.projectKey=icyfry_sandbox-cryptozombies-foundry
sonar.organization=icyfry
sonar.sources=contracts/src,dapp/src
sonar.tests=contracts/test,dapp/tests
sonar.javascript.lcov.reportPaths=dapp/coverage/lcov.info
sonar.coverage.exclusions=dapp/**/*.test.*
sonar.tests=contracts/test,dapp/src/tests
sonar.javascript.lcov.reportPaths=dapp/src/coverage/lcov.info
sonar.coverage.exclusions=dapp/**/*.test.*
sonar.exclusions=dapp/src/tests/*,dapp/src/abi/*

0 comments on commit b28f16e

Please sign in to comment.