-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
1,098 additions
and
1,382 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,9 @@ | ||
# Set update schedule for GitHub Actions | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
# Check for updates to GitHub Actions every week | ||
interval: "weekly" |
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 |
---|---|---|
|
@@ -13,101 +13,129 @@ jobs: | |
pre-commit: | ||
name: Various quality checks with pre-commit | ||
runs-on: ubuntu-latest | ||
env: | ||
UV_CACHE_DIR: /tmp/.uv-cache | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- uses: pre-commit/[email protected].0 | ||
python-version: ${{ vars.MAIN_PYTHON }} | ||
- uses: pre-commit/[email protected].1 | ||
env: | ||
SKIP: "mypy,ruff,black,poetry-lock" | ||
SKIP: "mypy,ruff" | ||
ruff: | ||
name: Lint with ruff | ||
runs-on: ubuntu-latest | ||
env: | ||
UV_CACHE_DIR: /tmp/.uv-cache | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v2 | ||
with: | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ruff | ||
version: ${{ vars.UV_VERSION }} | ||
enable-cache: true | ||
cache-dependency-glob: "uv.lock" | ||
cache-local-path: "/tmp/.uv-cache" | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up Python | ||
run: uv python install ${{ vars.MAIN_PYTHON }} | ||
- name: Ruff Lint | ||
run: ruff check . | ||
run: uv run ruff check . | ||
- name: Ruff Format | ||
run: ruff format . | ||
run: uv run ruff format . | ||
mypy: | ||
name: Type check with mypy | ||
runs-on: ubuntu-latest | ||
env: | ||
UV_CACHE_DIR: /tmp/.uv-cache | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: pipx install poetry | ||
- uses: actions/setup-python@v4 | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v2 | ||
with: | ||
python-version: '3.11' | ||
cache: 'poetry' | ||
- run: poetry install | ||
- run: poetry run mypy . | ||
version: ${{ vars.UV_VERSION }} | ||
enable-cache: true | ||
cache-dependency-glob: "uv.lock" | ||
cache-local-path: "/tmp/.uv-cache" | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up Python | ||
run: uv python install ${{ vars.MAIN_PYTHON }} | ||
- run: uv run mypy . | ||
initial-test: | ||
name: Test One Version First | ||
runs-on: ubuntu-latest | ||
env: | ||
UV_CACHE_DIR: /tmp/.uv-cache | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: pipx install poetry | ||
- uses: actions/setup-python@v4 | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v2 | ||
with: | ||
python-version: 3.11 | ||
cache: 'poetry' | ||
- run: poetry --version | ||
- run: poetry install | ||
- run: poetry run pytest | ||
version: ${{ vars.UV_VERSION }} | ||
enable-cache: true | ||
cache-dependency-glob: "uv.lock" | ||
cache-local-path: "/tmp/.uv-cache" | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up Python | ||
run: uv python install ${{ vars.MAIN_PYTHON }} | ||
- name: Install the project | ||
run: uv sync --all-extras --dev | ||
- run: uv run pytest | ||
name: Run tests | ||
- run: poetry run coverage lcov | ||
- run: uv run coverage lcov | ||
name: Generate coverage report for this run | ||
- name: Upload coverage report for this run to coveralls | ||
uses: coverallsapp/github-action@master | ||
uses: coverallsapp/github-action@main | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
path-to-lcov: .cov/coverage.lcov | ||
parallel: true | ||
test: | ||
name: Pytest via poetry | ||
name: Pytest via uv | ||
env: | ||
UV_CACHE_DIR: /tmp/.uv-cache | ||
needs: | ||
- pre-commit | ||
- ruff | ||
- mypy | ||
- initial-test | ||
strategy: | ||
matrix: | ||
python-version: ["3.11", "3.10", "3.9", "3.8", "3.12", "pypy3.8", "pypy3.9", "3.13.0-alpha.2"] | ||
python-version: ["3.12", "3.11", "3.10", "3.9", "3.8", "pypy3.10", "3.13.0-rc.1", "3.14.0-alpha.0"] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
exclude: | ||
- os: windows-latest | ||
python-version: pypy3.8 | ||
- os: windows-latest | ||
python-version: pypy3.9 | ||
- os: ubuntu-latest | ||
python-version: 3.11 | ||
python-version: ${{ vars.MAIN_PYTHON }} | ||
#we already did this one | ||
continue-on-error: ${{ contains(matrix.python-version,'3.13') || (contains(matrix.python-version, 'pypy') && matrix.os == 'windows-latest') || matrix.python-version == 'pypy3.8'}} | ||
continue-on-error: ${{ contains(matrix.python-version,'3.13') || contains(matrix.python-version,'3.14') || (contains(matrix.python-version, 'pypy') && matrix.os == 'windows-latest')}} | ||
runs-on: ${{ matrix.os }} | ||
if: ${{ github.actor != 'dependabot[bot]' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: pipx install poetry | ||
- uses: actions/setup-python@v4 | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v2 | ||
with: | ||
version: ${{ vars.UV_VERSION }} | ||
enable-cache: true | ||
cache-dependency-glob: "uv.lock" | ||
cache-local-path: "/tmp/.uv-cache" | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up Python | ||
if: ${{ ! (contains(matrix.python-version,'3.13') || contains(matrix.python-version,'3.14')) }} | ||
run: uv python install ${{ matrix.python-version }} | ||
- uses: actions/setup-python@v5 | ||
if: ${{ (contains(matrix.python-version,'3.13') || contains(matrix.python-version,'3.14')) }} | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'poetry' | ||
- run: poetry --version | ||
- run: poetry install --only main,test | ||
- run: poetry run pytest | ||
- name: Install the project | ||
run: uv sync --all-extras --dev | ||
- run: uv run pytest | ||
name: Run tests | ||
- run: poetry run coverage lcov | ||
- run: uv run coverage lcov | ||
name: Generate coverage report for this run | ||
- name: Upload coverage report for this run to coveralls | ||
uses: coverallsapp/github-action@master | ||
uses: coverallsapp/github-action@main | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
path-to-lcov: .cov/coverage.lcov | ||
|
@@ -118,7 +146,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Coveralls Finished | ||
uses: coverallsapp/github-action@master | ||
uses: coverallsapp/github-action@main | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
path-to-lcov: .cov/coverage.lcov | ||
|
@@ -149,12 +177,15 @@ jobs: | |
- test | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: pipx install poetry | ||
- uses: actions/setup-python@v4 | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v2 | ||
with: | ||
python-version: 3.11 | ||
cache: 'poetry' | ||
- run: poetry --version | ||
- run: poetry build | ||
version: ${{ vars.UV_VERSION }} | ||
enable-cache: true | ||
cache-dependency-glob: "uv.lock" | ||
cache-local-path: "/tmp/.uv-cache" | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build package | ||
run: uv build | ||
- name: Publish package distributions 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
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
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
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
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
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
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.