Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
narumiruna committed Nov 12, 2024
1 parent 4c6b91a commit 46cd312
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 32 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,14 @@ jobs:
strategy:
matrix:
python-version: ["3.11"]
poetry-version: ["1.8.3"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
cache: pip
- uses: narumiruna/setup-poetry@v1
with:
poetry-version: ${{ matrix.poetry-version }}
cache: true
enable-cache: true
- name: Publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry build -f wheel
poetry publish
uv build --wheel
uv publish
24 changes: 10 additions & 14 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,22 @@ jobs:
strategy:
matrix:
python-version: ["3.11"]
poetry-version: ["1.8.3"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
cache: pip
- uses: narumiruna/setup-poetry@v1
with:
poetry-version: ${{ matrix.poetry-version }}
cache: true
enable-cache: true
- name: Install Python
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: poetry install
run: uv sync
- name: Lint
run: poetry run ruff check .
run: uv run ruff check .
- name: Type check
run: poetry run mypy --install-types --non-interactive .
run: uv run mypy --install-types --non-interactive .
- name: Test
run: poetry run pytest -v -s --cov=. --cov-report=xml tests
run: uv run pytest -v -s --cov=src --cov-report=xml tests
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
install:
poetry install

lint:
poetry run ruff check .
uv run ruff check .

test:
poetry run pytest -v -s --cov=. tests
uv run pytest -v -s --cov=src tests

type:
uv run mypy --install-types --non-interactive .

publish:
poetry build -f wheel
poetry publish
uv build --wheel
uv publish

.PHONY: lint test publish

0 comments on commit 46cd312

Please sign in to comment.