mirror of
https://github.com/sprockets/sprockets-statsd.git
synced 2024-11-21 19:28:35 +00:00
Pass coverage.xml to sonar analysis.
Since the code doesn't contain any version specific stuff, we don't need to combine coverage output files (thank $diety).
This commit is contained in:
parent
396f667598
commit
40708fa70c
1 changed files with 14 additions and 2 deletions
16
.github/workflows/run-tests.yml
vendored
16
.github/workflows/run-tests.yml
vendored
|
@ -8,6 +8,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
name: Tests and style checks
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -34,21 +35,32 @@ jobs:
|
||||||
coverage run -m unittest
|
coverage run -m unittest
|
||||||
coverage report
|
coverage report
|
||||||
coverage xml -o ./coverage.xml
|
coverage xml -o ./coverage.xml
|
||||||
- name: Upload coverage
|
- name: Send coverage to codecov.io
|
||||||
uses: codecov/codecov-action@v1.3.2
|
uses: codecov/codecov-action@v1.3.2
|
||||||
with:
|
with:
|
||||||
token: ${{secrets.CODECOV_TOKEN}}
|
token: ${{secrets.CODECOV_TOKEN}}
|
||||||
file: ./coverage.xml
|
file: ./coverage.xml
|
||||||
flags: unittests
|
flags: unittests
|
||||||
fail_ci_if_error: true
|
fail_ci_if_error: true
|
||||||
verbose: true
|
- name: Save coverage report
|
||||||
|
if: ${{ matrix.python-version == "3.9" }}
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: coverage.xml
|
||||||
|
path: ./coverage.xml
|
||||||
|
|
||||||
sonarcloud:
|
sonarcloud:
|
||||||
name: SonarCloud
|
name: SonarCloud
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ secrets.SONAR_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||||
|
- name: Download coverage report
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: coverage.xml
|
||||||
- name: SonarCloud Scan
|
- name: SonarCloud Scan
|
||||||
uses: SonarSource/sonarcloud-github-action@master
|
uses: SonarSource/sonarcloud-github-action@master
|
||||||
env:
|
env:
|
||||||
|
|
Loading…
Reference in a new issue