-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
version up, switch to uv, more airac functions fix #116
- Loading branch information
Showing
8 changed files
with
912 additions
and
912 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
$schema: "https://docs.renovatebot.com/renovate-schema.json", | ||
lockFileMaintenance: { | ||
enabled: true, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,33 +6,25 @@ on: | |
types: [published] | ||
workflow_dispatch: | ||
|
||
env: | ||
POETRY_VERSION: "1.6.1" | ||
PYTHON_VERSION: "3.10" | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v3 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
enable-cache: true | ||
|
||
- name: Install and configure Poetry | ||
uses: snok/[email protected] | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
version: ${{ env.POETRY_VERSION }} | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
|
||
- name: Display Python version | ||
run: poetry run python -c "import sys; print(sys.version)" | ||
python-version: "3.12" | ||
|
||
- name: Build packages | ||
run: poetry build | ||
run: | | ||
uvx hatchling build | ||
- name: Publish a Python distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,69 +5,48 @@ on: | |
pull_request_target: | ||
workflow_dispatch: | ||
|
||
env: | ||
POETRY_VERSION: "1.6.1" | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest # ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
# os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
env: | ||
PYTHON_VERSION: ${{ matrix.python-version }} | ||
python-version: | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
- "3.13" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v3 | ||
with: | ||
enable-cache: true | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# Update full Python version | ||
- name: Full Python version | ||
run: | | ||
echo "PYTHON_VERSION=$(python -c "import platform; print(platform.python_version())")" | ||
echo "PYTHON_VERSION=$(python -c "import platform; print(platform.python_version())")" >> $GITHUB_ENV | ||
# virtualenv cache should depends on OS, Python version and `poetry.lock` (and optionally workflow files). | ||
- name: Cache Packages | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.local | ||
.venv | ||
key: poetry-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/poetry.lock') }} | ||
|
||
- name: Install and configure Poetry | ||
uses: snok/[email protected] | ||
with: | ||
version: ${{ env.POETRY_VERSION }} | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
|
||
- name: Display Python version | ||
run: poetry run python -c "import sys; print(sys.version)" | ||
|
||
- name: Install dependencies | ||
run: | | ||
poetry install | ||
- name: Install the project | ||
run: uv sync --all-extras --dev | ||
|
||
- name: Style checking | ||
if: ${{ matrix.python-version == '3.10' }} | ||
run: | | ||
poetry run ruff check src tests | ||
poetry run ruff format --check src tests | ||
uv run ruff check src tests | ||
uv run ruff format --check src tests | ||
- name: Type checking | ||
if: ${{ matrix.python-version == '3.10' }} | ||
run: | | ||
poetry run mypy src tests | ||
uv run mypy src tests | ||
- name: Run tests | ||
run: | | ||
poetry run pytest --cov --cov-report xml | ||
uv run pytest --cov --cov-report xml | ||
- name: Upload coverage to Codecov | ||
if: ${{ github.event_name != 'pull_request_target' && matrix.python-version == '3.10' }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.