diff --git a/.github/workflows/python-testing.yml b/.github/workflows/python-testing.yml index e110bc9..bd1b62a 100644 --- a/.github/workflows/python-testing.yml +++ b/.github/workflows/python-testing.yml @@ -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: @@ -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/ diff --git a/.gitignore b/.gitignore index ed589ee..2d58cb8 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,7 @@ zzz/ **/__pycache__ # Don't send the venv! -cfxenv \ No newline at end of file +cfxenv + +# Don't upload a Pytest coverage report +.coverage \ No newline at end of file diff --git a/README.md b/README.md index 61e4ce5..965a649 100644 --- a/README.md +++ b/README.md @@ -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)