2
.github/workflows/cd.yml
vendored
2
.github/workflows/cd.yml
vendored
@@ -37,4 +37,4 @@ jobs:
|
|||||||
|
|
||||||
- name: Publish distribution 📦 to PyPI
|
- name: Publish distribution 📦 to PyPI
|
||||||
if: startsWith(github.ref, 'refs/tags')
|
if: startsWith(github.ref, 'refs/tags')
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
@@ -26,3 +26,12 @@ jobs:
|
|||||||
run: make ci_lint
|
run: make ci_lint
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: make ci_test
|
run: make ci_test
|
||||||
|
- name: Generate coverage report
|
||||||
|
run: make coverage
|
||||||
|
- name: Upload coverage reports to Codecov
|
||||||
|
uses: codecov/codecov-action@v3
|
||||||
|
with:
|
||||||
|
file: coverage.xml
|
||||||
|
env:
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
||||||
|
|||||||
5
Makefile
5
Makefile
@@ -4,7 +4,7 @@ PIP := $(PYTHON) -m pip
|
|||||||
PROJECT_NAME := embedchain
|
PROJECT_NAME := embedchain
|
||||||
|
|
||||||
# Targets
|
# Targets
|
||||||
.PHONY: install format lint clean test ci_lint ci_test
|
.PHONY: install format lint clean test ci_lint ci_test coverage
|
||||||
|
|
||||||
install:
|
install:
|
||||||
poetry install
|
poetry install
|
||||||
@@ -39,3 +39,6 @@ ci_lint:
|
|||||||
|
|
||||||
ci_test:
|
ci_test:
|
||||||
poetry run pytest
|
poetry run pytest
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
poetry run pytest --cov=$(PROJECT_NAME) --cov-report=xml
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ pytest-mock = "^3.10.0"
|
|||||||
pytest-env = "^0.8.1"
|
pytest-env = "^0.8.1"
|
||||||
click = "^8.1.3"
|
click = "^8.1.3"
|
||||||
isort = "^5.12.0"
|
isort = "^5.12.0"
|
||||||
|
pytest-cov = "^4.1.0"
|
||||||
|
|
||||||
[tool.poetry.extras]
|
[tool.poetry.extras]
|
||||||
streamlit = ["streamlit"]
|
streamlit = ["streamlit"]
|
||||||
|
|||||||
Reference in New Issue
Block a user