Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytest-cov #69

Merged
merged 1 commit into from
Nov 13, 2023
Merged
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
16 changes: 4 additions & 12 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,20 @@ on:
jobs:
publish:
runs-on: ubuntu-latest

strategy:
max-parallel: 1
matrix:
python-version: [3.9]
poetry-version: [1.6.1]

poetry-version: [1.7.0]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Poetry
uses: abatilo/actions-poetry@v2
- uses: actions/checkout@v4
- uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}

- name: Setup Python
uses: actions/setup-python@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry

- name: Publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
Expand Down
20 changes: 5 additions & 15 deletions .github/workflows/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,27 @@ on:
jobs:
build:
runs-on: ubuntu-latest

strategy:
max-parallel: 1
matrix:
python-version: [3.9]
poetry-version: [1.6.1]

poetry-version: [1.7.0]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Poetry
uses: abatilo/actions-poetry@v2
- uses: actions/checkout@v4
- uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}

- name: Setup Python
uses: actions/setup-python@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry

- name: Install dependencies
run: poetry install

- name: Lint
run: poetry run flake8 -v

- name: Test
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
run: |
poetry run coverage run -m pytest -v -s tests
poetry run pytest -v -s --cov=mlconfig --cov-report=xml tests
poetry run codecov
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
VERSION := $(shell poetry version -s)
install:
poetry install

tag:
git tag v${VERSION} && git push origin v${VERSION}
lint:
poetry run flake8 -v

test:
poetry run pytest -v -s tests
poetry run pytest -v -s --cov=mlconfig tests
71 changes: 44 additions & 27 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ python = "^3.9"
omegaconf = "^2.3.0"

[tool.poetry.group.dev.dependencies]
black = "^23.9.1"
black = "^23.11.0"
codecov = "^2.1.13"
flake8 = "^6.0.0"
flake8 = "^6.1.0"
isort = "^5.12.0"
pytest = "^7.3.2"
pytest = "^7.4.3"
pytest-cov = "^4.1.0"
toml = "^0.10.2"

[build-system]
Expand Down