-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (36 loc) · 1.07 KB
/
code-climate.yml
File metadata and controls
43 lines (36 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
name: CodeClimate report
on:
push:
branches:
- master
jobs:
codeChecks:
name: tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Python and pipenv
uses: actions/setup-python@v1
with:
python-version: '3.7'
- name: Install dependencies
run: make install-ci
- name: Fetch test reporter from CodeClimate
run: |
export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
- name: Run tests
run: tox -e tests
- name: Update CodeClimate with new test report
if: success()
run: |
coverage xml -o coverage.xml
./cc-test-reporter after-build --coverage-input-type coverage.py --exit-code 0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}