@@ -37,10 +37,19 @@ jobs:
3737 run : |
3838 python -m pip install --upgrade pip
3939 python -m pip install --upgrade setuptools wheel
40- pip install -r requirements.txt
40+ python -m pip install -r requirements.txt
4141 - name : Test with unittest
4242 run : |
4343 python setup.py test
44+ - name : Test coverage
45+ run : |
46+ python -m pip install codecov coverage
47+ coverage run -m unittest discover
48+ env
49+ bash <(curl --proto '=https' --tlsv1.2 -sSf https://codecov.io/bash)
50+ env :
51+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
52+ if : matrix.os.name == 'Linux' && github.ref == 'refs/heads/master'
4453 test :
4554 name : ${{ matrix.os.name }} ${{ matrix.python-version }}
4655 runs-on : ${{ matrix.os.runs-on }}
@@ -68,24 +77,24 @@ jobs:
6877 run : |
6978 python -m pip install --upgrade pip
7079 python -m pip install --upgrade setuptools wheel
71- pip install -r requirements.txt
80+ python -m pip install -r requirements.txt
7281 - name : Test with unittest
7382 run : |
7483 python setup.py test
7584
7685 - name : Lint with flake8
7786 run : |
78- pip install flake8
87+ python -m pip install flake8
7988 flake8 . --count --select=$(printf '%s,' {A..Z}) --ignore='F811,W503,E203' --show-source --max-complexity=13 --max-line-length=119 --statistics
8089 if : matrix.python-version == '3.8' && matrix.os.name == 'Linux' && github.ref == 'refs/heads/master'
8190 - name : Check formatted with black
8291 run : |
83- pip install black
92+ python -m pip install black
8493 python -m black . --check --extend-exclude 'cdd/tests/mocks/cstify.py'
8594 if : matrix.python-version == '3.8' && matrix.os.name == 'Linux' && github.ref == 'refs/heads/master'
8695 - name : Doc coverage
8796 run : |
88- pip install interrogate
97+ python -m pip install interrogate
8998 interrogate -e 'cdd/tests/mocks/cstify.py' --generate-badge '.github/doccoverage.svg'
9099 sed -i 's/interrogate/doc coverage/g; s/data-doc c/data-doc-c/g' .github/doccoverage.svg
91100 # Setup git config
@@ -103,7 +112,7 @@ jobs:
103112 if: matrix.python-version == '3.8' && matrix.os.name == 'Linux' && github.ref == 'refs/heads/master'
104113 - name: Test coverage
105114 run: |
106- pip install codecov coverage
115+ python -m pip install codecov coverage
107116 coverage run -m unittest discover
108117 env
109118 bash <(curl --proto '=https' --tlsv1.2 -sSf https://codecov.io/bash)
@@ -112,7 +121,7 @@ jobs:
112121 if: (matrix.python-version == '3.8' || matrix.python-version == '3.12') && matrix.os.name == 'Linux' && github.ref == 'refs/heads/master'
113122 - name: PyPi release
114123 run: |
115- pip install twine
124+ python -m pip install twine
116125 python setup.py sdist bdist_wheel
117126 python -m twine upload --repository pypi dist/*
118127 env:
0 commit comments