Skip to content

task(ci): add sonar #165

task(ci): add sonar

task(ci): add sonar #165

Workflow file for this run

---
name: Code Coverage Check
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
- name: Set up poetry and install
uses: ./.github/actions/setup-poetry
with:
python-version: "3.9"
- name: Run tests
run: make test-code-cov
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage.xml
sonarcloud:
name: SonarCloud
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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}