diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cb1cf5b..70a6cab 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,10 +36,10 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install deps - run: python -mpip install -r requirements.txt + run: python -mpip install -r requirements-dev.txt - name: Test - run: python -munittest + run: python -mcoverage run --branch -m unittest && python -mcoverage report --fail-under=100 pre-commit: runs-on: ubuntu-20.04 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1515a5e --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +.PHONY: coverage +coverage: + python3 -mcoverage run --branch -m unittest + python3 -mcoverage html + python3 -mcoverage annotate + python3 -mcoverage report --fail-under=100 + +# Copyright (C) 2021 Jeff Epler +# SPDX-FileCopyrightText: 2021 Jeff Epler +# +# SPDX-License-Identifier: GPL-3.0-or-later diff --git a/requirements-dev.txt b/requirements-dev.txt index cf596f7..738fbfd 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -3,5 +3,6 @@ # SPDX-License-Identifier: GPL-3.0-or-later adafruit-circuitpython-datetime beautifulsoup4 +coverage pre-commit requests