This repository was archived by the owner on Sep 23, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (56 loc) · 1.78 KB
/
Copy pathcodeclimate_coverage.yml
File metadata and controls
58 lines (56 loc) · 1.78 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
name: Code Climate Coverage Report
on: # yamllint disable-line rule:truthy
workflow_call:
secrets:
cc_test_reporter_id:
required: true
jobs:
run:
runs-on: ${{ matrix.os }}
# Adding 'timeout-minutes: 10' would prevent jobs from running
# indefinitely if something goes wrong
timeout-minutes: 10
strategy:
matrix:
os: ['ubuntu-24.04']
python-version: ["3.X"]
steps:
- uses: actions/checkout@main
- name: Setup Python
uses: actions/setup-python@main
with:
python-version: "3.12"
check-latest: true
- name: Check Python version
run: python --version
- name: Check PYTHONPATH
run: |
pwd
export PYTHONPATH=.:$PYTHONPATH
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install --upgrade wheel
python -m pip install --no-cache-dir -r requirements.txt --upgrade
- name: Install pytest, pytest-cov
run: |
python -m pip install pytest
python -m pip install pytest-cov
- name: Check pytest, pytest-cov version
run: |
python -m pytest --version
- name: Upload coverage to Code Climate
uses: paambaati/codeclimate-action@v9.0.0
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=./ --junitxml=junit.xml -o junit_family=legacy --debug
debug: true
# yamllint enable rule:line-length
- name: List test files
run: |
ls *.xml