Improve sonar cloud feedback speed
This commit is contained in:
parent
b1e80994b4
commit
2cf722cd46
2 changed files with 26 additions and 25 deletions
49
.github/workflows/package.yml
vendored
49
.github/workflows/package.yml
vendored
|
@ -6,6 +6,30 @@ on:
|
||||||
types: [created]
|
types: [created]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
sonarCloudTrigger:
|
||||||
|
name: SonarCloud Trigger
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v1.1.1
|
||||||
|
with:
|
||||||
|
python-version: 3.8
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install poetry
|
||||||
|
poetry install
|
||||||
|
- name: Test with pytest
|
||||||
|
run: |
|
||||||
|
poetry run coverage run --source=ofx_processor -m pytest --color=yes
|
||||||
|
poetry run coverage xml
|
||||||
|
- name: SonarCloud Scan
|
||||||
|
uses: sonarsource/sonarcloud-github-action@v1.1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Python ${{ matrix.python-version }} / ${{ matrix.os }}
|
name: Python ${{ matrix.python-version }} / ${{ matrix.os }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
@ -29,30 +53,7 @@ jobs:
|
||||||
poetry install
|
poetry install
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
poetry run coverage run --source=ofx_processor -m pytest --color=yes
|
poetry run pytest --color=yes
|
||||||
poetry run coverage xml
|
|
||||||
- name: Coverage report upload
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: coverage_${{ matrix.os }}_${{ matrix.python-version }}
|
|
||||||
path: coverage.xml
|
|
||||||
|
|
||||||
sonarCloudTrigger:
|
|
||||||
name: SonarCloud Trigger
|
|
||||||
needs: build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Download coverage report
|
|
||||||
uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: coverage_ubuntu-latest_3.8
|
|
||||||
path: coverage-reports
|
|
||||||
- name: SonarCloud Scan
|
|
||||||
uses: sonarsource/sonarcloud-github-action@v1.1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
name: Publish to PyPI
|
name: Publish to PyPI
|
||||||
|
|
|
@ -4,4 +4,4 @@ sonar.projectKey=Crocmagnon_ofx-processor
|
||||||
# relative paths to source directories. More details and properties are described
|
# relative paths to source directories. More details and properties are described
|
||||||
# in https://sonarcloud.io/documentation/project-administration/narrowing-the-focus/
|
# in https://sonarcloud.io/documentation/project-administration/narrowing-the-focus/
|
||||||
sonar.sources=ofx_processor
|
sonar.sources=ofx_processor
|
||||||
sonar.python.coverage.reportPaths=coverage-reports/coverage.xml
|
sonar.python.coverage.reportPaths=coverage.xml
|
||||||
|
|
Loading…
Reference in a new issue