Skip to content

Commit

Permalink
[Bugfix] Fix Sonarcloud integration (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
rogervila authored Mar 21, 2022
1 parent bbad4e0 commit c3ca0c7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,24 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]

steps:
- name: Checkout
uses: actions/checkout@v2.3.4
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2.2.2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Run tests
run: |
python -m pip install --upgrade pip
sh test.sh
- name: Get PR author
id: get_author
run: echo ::set-output name=AUTHOR::${{ github.event.pull_request.user.login }}
- name: SonarCloud Scan
if: ${{ matrix.python-version == '3.9'}}
if: ${{ matrix.python-version == '3.10' && steps.get_author.outputs.AUTHOR == 'rogervila' }}
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.SONAR_GITHUB_TOKEN }}
Expand All @@ -31,6 +34,7 @@ jobs:
args: >
-Dsonar.organization=rogervila-github
-Dsonar.projectKey=rogervila_python_carbon
-Dsonar.python.version=3.10
-Dsonar.python.coverage.reportPaths=coverage.xml
-Dsonar.sources=.
-Dsonar.exclusions=tests/**
Expand Down

0 comments on commit c3ca0c7

Please sign in to comment.