diff options
-rw-r--r-- | .coveragerc | 8 | ||||
-rw-r--r-- | .github/workflows/auto.yml | 15 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | doc/muistilista.txt | 5 | ||||
-rw-r--r-- | doc/määrittelydokumentti.pdf (renamed from määrittelydokumentti.pdf) | bin | 25993 -> 25993 bytes | |||
-rw-r--r-- | pyproject.toml | 1 | ||||
-rw-r--r-- | tui/tui.py | 2 |
8 files changed, 31 insertions, 4 deletions
diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..7b967e8 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,8 @@ +[run] +branch = True +omit = tests/* + +[report] +exclude_lines = + if __name__ == .__main__.: + diff --git a/.github/workflows/auto.yml b/.github/workflows/auto.yml index d4c744b..b360e1c 100644 --- a/.github/workflows/auto.yml +++ b/.github/workflows/auto.yml @@ -34,5 +34,16 @@ jobs: run: poetry install # Run unittests - - name: Run unittests - run: poetry run python3 -m pytest -v + - name: Run unittests with coverage + run: poetry run python3 -m coverage run --branch -m pytest -v + + # coverage -> xml + - name: Generate coverage report + run: poetry run python3 -m coverage xml + + # xml -> codecov + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + @@ -1,3 +1,5 @@ *~ poetry.lock __pycache__ +.coverage +coverage.xml @@ -3,5 +3,5 @@ Miinaharava ratkaisijalla ## Dokumentit: -- [määrittelydokumentti](m%C3%A4%C3%A4rittelydokumentti.pdf) +- [määrittelydokumentti](doc/m%C3%A4%C3%A4rittelydokumentti.pdf) diff --git a/doc/muistilista.txt b/doc/muistilista.txt new file mode 100644 index 0000000..e6b8a2b --- /dev/null +++ b/doc/muistilista.txt @@ -0,0 +1,5 @@ +MUISTILISTA! + +Generoi haarakattavuusraportti: +poetry run python3 -m coverage run --branch -m pytest && poetry run python3 -m coverage html && firefox htmlcov/index.html + diff --git a/määrittelydokumentti.pdf b/doc/määrittelydokumentti.pdf Binary files differindex 5268088..5268088 100644 --- a/määrittelydokumentti.pdf +++ b/doc/määrittelydokumentti.pdf diff --git a/pyproject.toml b/pyproject.toml index 2b936e4..90d7851 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,6 +11,7 @@ python = "^3.10" [tool.poetry.group.dev.dependencies] pytest = "^7.4.4" +coverage = "^7.4.0" [build-system] requires = ["poetry-core"] @@ -42,7 +42,7 @@ class Tui(): (' ', 7, 0), ('1', 10, 0), ('2', 12, 0), ('3', 11, 0), ('4', 9, 0), ('5', 9, 0), ('6', 9, 0), ('7', 9, 0), ('8', 9, 0), - ('9', 15, 1), ('#', 8, 7) + ('¤', 15, 1), ('#', 8, 7) ) if hilighted: |