diff --git a/.github/workflows/viot-test.yml b/.github/workflows/viot-test.yml index 3f70cea..1002823 100644 --- a/.github/workflows/viot-test.yml +++ b/.github/workflows/viot-test.yml @@ -46,6 +46,30 @@ jobs: working-directory: ./viot run: bash ./scripts/test.sh --cov-report=xml + sonar: + needs: + - test + runs-on: ubuntu-latest + steps: + - name: Check out Git repository + uses: actions/checkout@v4 + + - name: SonarCloud Scan + uses: sonarsource/sonarcloud-github-action@master + with: + projectBaseDir: viot + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + + codecov: + needs: + - test + runs-on: ubuntu-latest + steps: + - name: Check out Git repository + uses: actions/checkout@v4 + - name: Upload results to Codecov uses: codecov/codecov-action@v4 with: diff --git a/viot/sonar-project.properties b/viot/sonar-project.properties new file mode 100644 index 0000000..20f4ec3 --- /dev/null +++ b/viot/sonar-project.properties @@ -0,0 +1,5 @@ +sonar.projectKey=tuanvumaihuynh_viot +sonar.organization=tuanvumaihuynh +sonar.python.version=3.11 +sonar.sourceEncoding=UTF-8 +sonar.sources=app