Move codeclimate reporter to GitHub Actions
This commit is contained in:
parent
50f6288c86
commit
9588ab4355
2 changed files with 12 additions and 8 deletions
12
.github/workflows/test.yml
vendored
12
.github/workflows/test.yml
vendored
|
@ -25,6 +25,18 @@ jobs:
|
|||
|
||||
- name: Test with tox
|
||||
run: tox
|
||||
if: ${{ matrix.python-version != '3.9' }}
|
||||
|
||||
- name: Test with tox (and upload coverage)
|
||||
uses: paambaati/codeclimate-action@v2.7.5
|
||||
if: ${{ matrix.python-version == '3.9' }}
|
||||
env:
|
||||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
||||
with:
|
||||
coverageCommand: tox
|
||||
coverageLocations: |
|
||||
${{ github.workspace }}/.tox/reports/*/coverage.xml:coverage.py
|
||||
prefix: ${{ github.workspace }}/.tox/py39/lib/python3.9/site-packages
|
||||
|
||||
- uses: codecov/codecov-action@v1
|
||||
with:
|
||||
|
|
|
@ -6,23 +6,15 @@ jobs:
|
|||
- python: "3.7"
|
||||
- python: "3.8"
|
||||
- python: "3.9"
|
||||
env: "CC_TEST_REPORTER_ID=2a411f596959fc32f5d73f3ba7cef8cc4d5733299d742dbfc97fd6c190b9010c"
|
||||
cache: pip
|
||||
git:
|
||||
depth: false
|
||||
dist: xenial
|
||||
before_script:
|
||||
- "curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > cc-test-reporter"
|
||||
- "chmod +x cc-test-reporter"
|
||||
- "if [ -n \"$CC_TEST_REPORTER_ID\" ]; then ./cc-test-reporter before-build; fi"
|
||||
# command to install dependencies
|
||||
install:
|
||||
- pip install -U tox-travis setuptools
|
||||
# command to run tests
|
||||
script: tox
|
||||
after_success:
|
||||
- "if [ -n \"$CC_TEST_REPORTER_ID\" ]; then ./cc-test-reporter format-coverage --prefix $PWD/.tox/*/lib/*/site-packages --input-type coverage.py .tox/cov-*.xml; fi"
|
||||
- "if [ -n \"$CC_TEST_REPORTER_ID\" ]; then ./cc-test-reporter upload-coverage; fi"
|
||||
notifications:
|
||||
irc:
|
||||
channels:
|
||||
|
|
Loading…
Reference in a new issue