-
Notifications
You must be signed in to change notification settings - Fork 8
53 lines (53 loc) · 1.69 KB
/
codecoverage.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
48
49
50
51
52
53
name: Code coverage
on: [push, pull_request]
env:
COVERALLS_REPO_TOKEN: JMrWlp4AZqr735mFBcRyt9LaCgyUwBV3Z
jobs:
run:
runs-on: ubuntu-latest
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ubuntu-latest, macos-latest, windows-latest]
# env:
# OS: ${{ matrix.os }}
# PYTHON: '3.10'
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install environment
run: |
python -m pip install --upgrade pip
pip install -r test-requirements.txt
- name: Run tests and collect coverage
run: pytest --cov --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
# token: ${{ secrets.CODECOV_TOKEN }}
# directory: ./coverage/reports/
# env_vars: OS, PYTHON
fail_ci_if_error: true
files: ./coverage.xml
flags: pytest
name: codecov-umbrella
verbose: true
- name: Run tests and collect coverage
run: pytest --cov --cov-report=xml
- name: Coverage run
run: coverage run --source=uom setup.py test
- name: Coveralls post
run: |
coverage report -m
coveralls
# - name: Lint with flake8
# run: |
# pip install flake8
# pip install pylint
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics