Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
35 changes: 18 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
name: Release python package

on:
push:
tags:
- "*"
release:
types:
- released

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
- uses: actions/checkout@v5

- name: Install uv with python
uses: astral-sh/setup-uv@v7
with:
python-version: "3.9"
- name: Install deps
run: poetry install
- name: Set version
run: poetry version "${{ github.ref_name }}"
- name: Release package
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: poetry publish --build
python-version: "3.12"
enable-cache: true

- name: Set version from tag
run: uv version "${{ github.ref_name }}"

- name: Build artifacts
run: uv build

- name: Publish package
run: uv publish --token "${{ secrets.PYPI_TOKEN }}"
38 changes: 22 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
name: Testing package

on:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also add this block for consistency with other repositories:

on:
  pull_request:
    paths-ignore:
      - '*.md'
  push:
    paths-ignore:
      - '*.md'

permissions:
  actions: read
  contents: read
  pull-requests: read

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot about permissions block - please add it)

- push
- pull_request
pull_request:
paths-ignore:
- '*.md'
push:
paths-ignore:
- '*.md'


jobs:
lint:
strategy:
matrix:
cmd:
- black
- mypy
- ruff
python-version: ["3.10", "3.11", "3.12", "3.13"]
cmd: ["black", "mypy", "ruff"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
- uses: actions/checkout@v5


- name: Install uv with python
uses: astral-sh/setup-uv@v7
with:
python-version: "3.9"
cache: "poetry"
- name: Install deps
run: poetry install
python-version: "3.12"
enable-cache: true


- name: Install dependencies
run: uv sync --all-extras

- name: Run lint check
run: poetry run pre-commit run -a ${{ matrix.cmd }}
run: uv run pre-commit run -a ${{ matrix.cmd }}
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ repos:
hooks:
- id: black
name: Format with Black
entry: poetry run black
entry: uv run black
language: system
types: [python]

- id: mypy
name: Validate types with MyPy
entry: poetry run mypy
entry: uv run mypy
language: system
types: [python]

- id: ruff
name: Run ruff lints
entry: poetry run ruff
entry: uv run ruff
language: system
pass_filenames: false
types: [python]
Expand Down
Loading
Loading