Skip to content

Commit

Permalink
sonar configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
icyfry committed Sep 11, 2024
1 parent 6a0c4a3 commit e567db6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- master

jobs:
s3-deploy:
build-deploy:
runs-on: ubuntu-latest
environment: prod
steps:
Expand All @@ -32,6 +32,12 @@ jobs:

- name: Building the project
run: pnpm run build:prod


- 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 }}

- name: Deploy static site to S3 bucket
run: aws s3 sync ./dist/ ${{ secrets.AWS_S3 }} --delete
run: aws s3 sync ./dist/ ${{ secrets.AWS_S3 }} --delete
10 changes: 8 additions & 2 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- develop

jobs:
s3-deploy:
build-deploy:
runs-on: ubuntu-latest
steps:

Expand All @@ -31,6 +31,12 @@ jobs:

- name: Building the project
run: pnpm run build:staging

- 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 }}

- name: Deploy static site to S3 bucket
run: aws s3 sync ./dist/ s3://icyfry-website/staging --delete
run: aws s3 sync ./dist/ s3://icyfry-website/staging --delete
7 changes: 7 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
sonar.projectKey=icyfry_icyfry-website
sonar.organization=icyfry
sonar.sources=src
sonar.tests=src/tests
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.coverage.exclusions=**/*.test.*
sonar.exclusions=src/tests/*,dapp/src/abi/*

0 comments on commit e567db6

Please sign in to comment.