This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
Update issue templates #94
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SonarCloud check | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
branches: | |
- master | |
- devel | |
jobs: | |
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: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.9" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest pytest-cov | |
- name: Install source packages | |
run: | | |
pip install -e . | |
- name: Collect coverage | |
run: | | |
pytest --cov=src --cov-report=xml --cov-config=pyproject.toml --cov-branch | |
- name: Upload coverage report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: coverage | |
path: ./coverage.xml | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
with: | |
args: | |
-Dsonar.projectKey=edu-python-course_problem-sets | |
-Dsonar.organization=edu-python-course | |
-Dsonar.python.coverage.reportPaths=coverage.xml -X | |
-Dsonar.coverage.exclusions=**/scripts/**,**/__init__*,**/__main__*,**/tests/** -X | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |