Skip to content

Commit

Permalink
Added coverage report to testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Max-Derner committed Nov 27, 2024
1 parent 6b4620c commit e8c5909
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/python-testing.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Test and lint
name: Testing and linting

on:
push:
Expand All @@ -24,17 +24,17 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install a virtual environment
run: |
./setup-venv
- name: Lint with flake8
- name: Lint with Flake8
run: |
. ./cfxenv/bin/activate
# stop the build if there are Python syntax errors or undefined names
flake8 . --config tox.ini --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --config tox.ini --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
- name: Test with Pytest and report coverage
run: |
. ./cfxenv/bin/activate
pytest -vv
pytest --cov-report term-missing --cov=app tests/
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ zzz/
**/__pycache__

# Don't send the venv!
cfxenv
cfxenv

# Don't upload a Pytest coverage report
.coverage
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Test and lint](https://github.com/Max-Derner/colour_effects/actions/workflows/python-testing.yml/badge.svg?branch=main)](https://github.com/Max-Derner/colour_effects/actions/workflows/python-testing.yml)
[![Testing and linting](https://github.com/Max-Derner/colour_effects/actions/workflows/python-testing.yml/badge.svg?branch=main)](https://github.com/Max-Derner/colour_effects/actions/workflows/python-testing.yml)


![promo image](./README_IMGS/promo_img.png)
Expand Down

0 comments on commit e8c5909

Please sign in to comment.