Skip to content

Commit

Permalink
Changed: Restored coverage reporter #1398
Browse files Browse the repository at this point in the history
  • Loading branch information
insspb committed May 26, 2020
1 parent 47312ba commit 0d4b482
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Coverage reporter

on:
push:
branches:
- master
tags:
- "*"
pull_request:
branches:
- "*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox virtualenv
- name: Test build with coverage
run: "tox -e cov-report"
- name: Send coverage report to codeclimate
uses: paambaati/codeclimate-action@v2.6.0
with:
coverageCommand: echo "Ignore rerun"
coverageLocations: ${{github.workspace}}/coverage.xml:coverage.py
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
- name: Send coverage report to codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@ skip_install = true
usedevelop = false

[testenv:cov-report]
; This coverage only report run. Only for local development. Not used at CI/CD
passenv =
LC_ALL
LANG
HOME
commands =
pip install -e .
pytest --cov=cookiecutter --cov-report=term --cov-report=html
pytest --cov=cookiecutter --cov-report=term --cov-report=html --cov-report=xml
deps = -rtest_requirements.txt
skip_install = true

Expand Down

0 comments on commit 0d4b482

Please sign in to comment.