Skip to content

Commit

Permalink
Merge pull request #18 from chainyo/improve-ci
Browse files Browse the repository at this point in the history
improve ci + add coverage
  • Loading branch information
alvarobartt committed Aug 23, 2023
2 parents 0793d38 + 6b04acf commit 528cc2e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:
types:
- published

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
check-quality:
runs-on: ubuntu-latest
Expand All @@ -38,6 +42,7 @@ jobs:
run: |
black --check --diff --preview src tests
ruff src tests
mypy src
run-tests:
needs: check-quality
Expand All @@ -59,7 +64,7 @@ jobs:
pip install ".[tests]"
- name: run-tests
run: pytest tests/ -s --durations 0
run: pytest --cov=REPLACE_PACKAGE_NAME --cov-report=term-missing tests/ -s --durations 0

deploy-docs:
needs: run-tests
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ quality = [
]
tests = [
"pytest~=7.1.2",
"pytest-cov~=4.1",
]

[tool.hatch.envs.quality]
Expand Down Expand Up @@ -104,7 +105,7 @@ features = [
]

[tool.hatch.envs.tests.scripts]
run = "pytest tests/ --durations 0 -s"
run = "pytest --cov=REPLACE_PACKAGE_NAME --cov-report=term-missing tests/ --durations 0 -s"

[[tool.hatch.envs.tests.matrix]]
python = ["38", "39", "310", "311"]
Expand Down

0 comments on commit 528cc2e

Please sign in to comment.