Skip to content

Commit

Permalink
fix on sonar workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mankings committed Aug 17, 2024
1 parent 6cfb6ae commit c7bbb98
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
name: Build
name: Build Frontend
on:
push:
paths:
- 'backend/**'
- '.github/workflows/**'
branches:
- main

pull_request:
types: [opened, synchronize, reopened]
paths:
- 'backend/**'
- '.github/workflows/**'
types:
- opened
- synchronize
- reopened

jobs:
sonarcloud:
name: SonarCloud
name: SonarCloud Backend
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
with:
projectBaseDir: backend
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_BACKEND }}
33 changes: 33 additions & 0 deletions .github/workflows/build-frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build Frontend
on:
push:
paths:
- 'frontend/**'
- '.github/workflows/**'
branches:
- main

pull_request:
paths:
- 'frontend/**'
- '.github/workflows/**'
types:
- opened
- synchronize
- reopened

jobs:
sonarcloud:
name: SonarCloud Frontend
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
with:
projectBaseDir: frontend
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_FRONTEND }}
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
sonar.projectKey=d4d-backend
sonar.projectKey=d4d-frontend
sonar.organization=aettua

# This is the name and version displayed in the SonarCloud UI.
#sonar.projectName=d4d-backend
#sonar.projectName=d4d-frontend
#sonar.projectVersion=1.0


# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
#sonar.sources=.
sonar.sources=.

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8

0 comments on commit c7bbb98

Please sign in to comment.