diff --git a/.github/workflows/sonar-frontend.yml b/.github/workflows/sonar-frontend.yml new file mode 100644 index 0000000..29b561f --- /dev/null +++ b/.github/workflows/sonar-frontend.yml @@ -0,0 +1,20 @@ +name: Analyze Frontend +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] +jobs: + sonarcloud: + name: SonarCloud + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + 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 }} \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..66bcdad --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,3 @@ +sonar.projectKey=neuefische_java-curriculum-6-java-02-Fullstack-Project-frontend +sonar.organization=neuefische +sonar.sources=./frontend/src