-
Notifications
You must be signed in to change notification settings - Fork 6
47 lines (45 loc) · 1.27 KB
/
codeclimate_coverage.yml
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
44
45
46
47
---
name: Code Climate Coverage Report
on: # yamllint disable-line rule:truthy
pull_request_target:
types:
- opened
- edited
- synchronize
- reopened
workflow_call:
secrets:
cc_test_reporter_id:
required: true
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.X"]
steps:
- uses: actions/checkout@main
- name: Setup Python
uses: actions/setup-python@main
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install pytest
pip install -r requirements.txt
pip install pytest-cov
- name: Check PYTHONPATH
run: |
pwd
export PYTHONPATH=.:$PYTHONPATH
- name: Upload coverage to Code Climate
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
# yamllint disable rule:line-length
coverageCommand: python -m pytest . -v --cov-report term-missing --cov-report=xml --cov=./
# yamllint enable rule:line-length
debug: true