mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Report coverage to Codacy for behave tests (#2518)
This commit is contained in:
@@ -143,21 +143,16 @@ jobs:
|
|||||||
features/output/*
|
features/output/*
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
- uses: actions/setup-python@v4
|
- name: Generate coverage xml report
|
||||||
with:
|
run: python -m coverage xml -o cobertura.xml
|
||||||
python-version: '3.10'
|
- name: Upload coverage to Codacy
|
||||||
- name: Install coveralls
|
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r cobertura.xml -l Python --partial
|
||||||
run: python -m pip install coveralls
|
|
||||||
- name: Upload Coverage
|
|
||||||
env:
|
env:
|
||||||
COVERALLS_FLAG_NAME: behave-${{ matrix.os }}-${{ matrix.dcs }}-${{ matrix.python-version }}
|
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||||
COVERALLS_PARALLEL: 'true'
|
|
||||||
GITHUB_TOKEN: ${{ secrets.github_token }}
|
|
||||||
run: python -m coveralls --service=github
|
|
||||||
|
|
||||||
coveralls-finish:
|
coveralls-finish:
|
||||||
name: Finalize coveralls.io
|
name: Finalize coveralls.io
|
||||||
needs: [unit, behave]
|
needs: unit
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
@@ -165,3 +160,12 @@ jobs:
|
|||||||
- run: python -m coveralls --service=github --finish
|
- run: python -m coveralls --service=github --finish
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.github_token }}
|
GITHUB_TOKEN: ${{ secrets.github_token }}
|
||||||
|
|
||||||
|
codacy-final:
|
||||||
|
name: Finalize Codacy
|
||||||
|
needs: behave
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- run: bash <(curl -Ls https://coverage.codacy.com/get.sh) final
|
||||||
|
env:
|
||||||
|
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user