Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand All @@ -30,8 +30,15 @@ jobs:
- name: Install development dependencies
run: make install-dev

- name: Run tests
run: make test
- name: Run tests with coverage
run: make coverage

- name: Upload coverage report
uses: actions/upload-artifact@v4
if: matrix.python-version == '3.13'
with:
name: coverage-report
path: htmlcov/

- name: Run example
run: venv/bin/resqui -c configurations/basic.json -t ${{ secrets.GITHUB_TOKEN }}
16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ PKGNAME=resqui
VENV=venv
PYTHON=$(VENV)/bin/python
PIP=$(VENV)/bin/pip
COVERAGE=$(VENV)/bin/coverage

$(VENV)/bin/activate:
$(VENV)/bin/activate: pyproject.toml
python3 -m venv $(VENV)
$(PIP) install -e ".[dev,docs]"
touch $(VENV)/bin/activate

install: $(VENV)/bin/activate

Expand All @@ -16,7 +18,13 @@ install-docs: $(VENV)/bin/activate
venv: $(VENV)/bin/activate

test: $(VENV)/bin/activate
$(PYTHON) run_tests.py
$(COVERAGE) run -m unittest discover -s tests
$(COVERAGE) report -m

coverage: $(VENV)/bin/activate
$(COVERAGE) run -m unittest discover -s tests
$(COVERAGE) html
$(COVERAGE) report -m

example: $(VENV)/bin/activate
$(VENV)/bin/resqui -c configurations/basic.json
Expand All @@ -32,6 +40,6 @@ docs-serve: $(VENV)/bin/activate
$(VENV)/bin/mkdocs serve

clean:
rm -rf venv site
rm -rf venv site htmlcov .coverage

.PHONY: install install-dev install-docs venv test example black docs docs-serve clean
.PHONY: install install-dev install-docs venv test coverage example black docs docs-serve clean
14 changes: 13 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,21 @@ readme = { file = "README.md", content-type = "text/markdown" }
dynamic = ["version"]

[project.optional-dependencies]
dev = ["black"]
dev = ["black", "coverage[toml]"]
docs = ["mkdocs", "mkdocstrings[python]"]

[tool.coverage.run]
source = ["src/resqui"]
branch = true
omit = ["src/resqui/docopt.py"]

[tool.coverage.report]
show_missing = true
skip_empty = true

[tool.coverage.html]
directory = "htmlcov"

[project.scripts]
resqui = "resqui.cli:resqui"

Expand Down
101 changes: 0 additions & 101 deletions run_tests.py

This file was deleted.

64 changes: 0 additions & 64 deletions tests/runtests.py

This file was deleted.

Loading
Loading