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

chore: use pdm for dependency management #154

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
20 changes: 9 additions & 11 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: psf/[email protected]
- uses: chartboost/ruff-action@v1
with:
src: "./pydid"
version: "0.6.8"
args: 'format --check'
- uses: chartboost/ruff-action@v1
with:
version: 0.3.4
version: "0.6.8"

test:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
cache: true
- name: Install dependencies
run: poetry install
run: pdm install -G :all
- name: Run pytest
run: poetry run pytest
run: pdm run pytest
29 changes: 11 additions & 18 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,20 @@ on:

jobs:
deploy:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.9
uses: actions/setup-python@v5
- name: Setup Python
uses: pdm-project/setup-pdm@v4
with:
python-version: 3.9
cache: poetry
cache: true
- name: Install dependencies
run: poetry install
- name: Confidence check (run tests)
run: |
poetry run pytest
- name: Build package
run: |
poetry build
- name: Publish package
env:
POETRY_PYPI_TOKEN_PYPI: ${{secrets.PYPI_API_TOKEN}}
run: |
poetry publish
run: pdm install
- name: Run pytest
run: pdm run pytest
- name: Publish
run: pdm publish
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,4 @@ Thumbs.db #thumbnail cache on Windows
# End of https://www.toptal.com/developers/gitignore/api/python

.vim
.pdm-python
Loading