Skip to content

Commit

Permalink
Add SonarCloud config
Browse files Browse the repository at this point in the history
  • Loading branch information
Ru Chern Chong committed Jul 7, 2024
1 parent 3675a94 commit 4c3d9d4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/sst.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
name: SST workflow
name: Build

on: [ push ]

concurrency:
group: merge-${{ github.ref }}

permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
id-token: write
contents: read

jobs:
TestAndBuild:
Build:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -24,18 +25,20 @@ jobs:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: |
pnpm install
run: pnpm install
- name: Run tests
run: |
pnpm test
run: pnpm test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
# - name: SonarCloud Scan
# uses: SonarSource/sonarcloud-github-action@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Run build
run: |
pnpm build
run: pnpm build
env:
NEXT_PUBLIC_API_URL: ${{ vars.NEXT_PUBLIC_API_URL }}

Expand Down
4 changes: 4 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sonar.projectKey=ruchernchong_singapore-motor-trends
sonar.organization=ruchernchong
sonar.javascript.lcov.reportPaths=./coverage/lcov.info
sonar.coverage.exclusions=**/*.test.js,**/*.test.ts,**/*.spec.js,**/*.spec.ts

0 comments on commit 4c3d9d4

Please sign in to comment.