This repository has been archived by the owner on Jul 5, 2024. It is now read-only.
Update README.md #52
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 | |
on: | |
push: | |
branches: | |
- '**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.9] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setting up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Installing dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Running unit tests | |
run: | | |
pip install pytest | |
python -m pytest -v --cov=./TSIClient --cov-report xml --cov-report term | |
- name: fix code coverage paths | |
working-directory: . | |
run: | | |
sed -i 's/\/home\/runner\/work\/TSIClient\/TSIClient\//\/github\/workspace\//g' coverage.xml | |
- name: SonarCloud Scan | |
uses: sonarsource/sonarcloud-github-action@master | |
with: | |
args: > | |
-Dsonar.organization=raalabs | |
-Dsonar.projectKey=RaaLabs_TSIClient | |
-Dsonar.python.coverage.reportPaths=coverage.xml | |
-Dsonar.sources=TSIClient | |
-Dsonar.tests=tests | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |