Skip to content

Commit

Permalink
Merge branch 'issue/19'
Browse files Browse the repository at this point in the history
  • Loading branch information
rambasnet committed Feb 15, 2024
2 parents 29672e7 + f72ab37 commit 7261b97
Show file tree
Hide file tree
Showing 29 changed files with 3,716 additions and 5 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,22 @@ jobs:
pytest --verbose A1/cold/tests
pytest --verbose A1-OOP/cold/tests
- name: Generate coverage report
run: |
pytest --cov-report=xml --cov=A0/hello A0/hello
pytest --cov-report=xml --cov=A0-OOP/hello A0-OOP/hello
pytest --cov-report=xml --cov=A1/cold A1/cold A1/cold
pytest --cov-report=xml --cov=A1-OOP/cold A1-OOP/cold A1-OOP/cold
codecov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
env:
with:
fail_ci_if_error: true # optional (default = false)
files: A0/hello/coverage.xml \
A0-OOP/hello/coverage.xml \
A1/cold/coverage.xml \
A1-OOP/cold/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
slug: rambasnet/course-container

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
Expand Down
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
TEST = python -m pytest
TEST_ARGS = -s --verbose --color=yes
TEST_ARGS = --cov-report=xml -s --verbose --color=yes
TYPE_CHECK = mypy --strict --allow-untyped-decorators --ignore-missing-imports
STYLE_CHECK = flake8

.PHONY: all
all: check-style check-type run-test clean
all: check-style check-type run-test run-test-coverage clean

.PHONY: check-type
check-type:
Expand All @@ -28,6 +28,12 @@ run-test:
$(TEST) $(TEST_ARGS) A1/cold/tests
$(TEST) $(TEST_ARGS) A1-OOP/cold/tests

.PHONY: run-test-coverage
run-test-coverage:
$(TEST) --cov-report=html --cov-report=term --cov-report=annotate --cov=A0/hello A0/hello
$(TEST) --cov-report=html --cov-report=term --cov-report=annotate --cov=A0-OOP/hello A0-OOP/hello
$(TEST) --cov-report=html --cov-report=term --cov-report=annotate --cov=A1/cold A1/cold
$(TEST) --cov-report=html --cov-report=term --cov-report=annotate --cov=A1-OOP/cold A1-OOP/cold

.PHONY: clean
clean:
Expand All @@ -36,5 +42,5 @@ clean:
rm -rf `find . -type d -name .pytest_cache` # remove all pytest cache
rm -rf `find . -type d -name .mypy_cache` # remove all mypy cache
rm -rf `find . -type d -name .hypothesis` # remove all hypothesis cache
rm -rf `find . -type d -name .coverage` # remove all coverage cache
rm -rf `find . -name .coverage` # remove all coverage cache

1 change: 1 addition & 0 deletions ci-cd-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ mypy
flake8
hypothesis
pytest-cov
codecov
Loading

0 comments on commit 7261b97

Please sign in to comment.