Skip to content

Commit 365b37f

Browse files
committed
chore(CI): add code-climate report for test coverage
1 parent 5d16009 commit 365b37f

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/code-climate.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: CodeClimate report
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
codeChecks:
11+
name: tests
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: Install Python and pipenv
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: '3.7'
21+
22+
- name: Install dependencies
23+
run: make install-ci
24+
25+
- name: Fetch test reporter from CodeClimate
26+
run: |
27+
export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
28+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
29+
chmod +x ./cc-test-reporter
30+
./cc-test-reporter before-build
31+
32+
- name: Run tests
33+
run: tox -e tests
34+
35+
- name: Update CodeClimate with new test report
36+
if: success()
37+
run: |
38+
coverage xml -o coverage.xml
39+
./cc-test-reporter after-build --coverage-input-type coverage.py --exit-code 0

0 commit comments

Comments
 (0)