Skip to content
Closed
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
11 changes: 1 addition & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,8 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
interval: "monthly"
groups:
github-actions:
patterns:
- "*"

- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "weekly"
groups:
uv-lockfile:
patterns:
- "*"
44 changes: 30 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,16 @@ jobs:
with:
persist-credentials: false

- name: Setup uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
- name: Setup pixi
uses: prefix-dev/setup-pixi@2253d9c9310442c09975d64615591b5b381da6e7 # v0.10.0
with:
pixi-version: v0.71.3
environments: dev
cache: false
frozen: true

- name: Lint
run: uv run --frozen pre-commit run --all-files
run: pixi run --as-is -e dev pre-commit run --all-files

type-check:
name: Type Check
Expand All @@ -37,38 +42,49 @@ jobs:
with:
persist-credentials: false

- name: Setup uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
- name: Setup pixi
uses: prefix-dev/setup-pixi@2253d9c9310442c09975d64615591b5b381da6e7 # v0.10.0
with:
pixi-version: v0.71.3
environments: dev
cache: false
frozen: true

- name: Run type checks
run: uv run --frozen pyright src tests

run: pixi run --as-is -e dev ty check src tests

test:
name: Unit Tests - Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"] #, "3.14"]
python-version: ["3.11", "3.12", "3.13"]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
persist-credentials: false

- name: Setup uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
- name: Determine pixi environment
id: pixi
run: echo "env=py$(echo '${{ matrix.python-version }}' | tr -d '.')" >> "$GITHUB_OUTPUT"

- name: Setup Pixi
uses: prefix-dev/setup-pixi@2253d9c9310442c09975d64615591b5b381da6e7 # v0.10.0
with:
python-version: ${{ matrix.python-version }}
pixi-version: v0.71.3
environments: ${{ steps.pixi.outputs.env }}
cache: false
frozen: true

- name: Run tests for given python version
run: uv run --frozen pytest --cov=src/hextools --cov-report=xml --cov-report=term
- name: Run tests
run: pixi run --as-is -e ${{ steps.pixi.outputs.env }} pytest --cov=src/hextools --cov-report=xml --cov-report=term

# Uncomment once codecov is enabled.
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v5
# if: ${{ matrix.python-version == '3.13' }} # Only upload coverage for Python 3.13 to avoid duplicates
# if: ${{ matrix.python-version == '3.13' }}
# with:
# name: Coverage
# files: coverage.xml
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/pixi-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Pixi Update

on:
schedule:
- cron: "0 0 1 * *"
workflow_dispatch:

jobs:
update:
name: Update Pixi Lockfile
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
persist-credentials: true

- name: Setup pixi
uses: prefix-dev/setup-pixi@2253d9c9310442c09975d64615591b5b381da6e7 # v0.10.0
with:
pixi-version: v0.71.3
cache: false
frozen: true

- name: Run pixi update
run: pixi update

- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
commit-message: "Update pixi lockfile"
title: "Update pixi lockfile"
branch: pixi-update
body: "Automated monthly `pixi update` of the lockfile."
15 changes: 6 additions & 9 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,15 @@ jobs:
fetch-depth: 0
persist-credentials: false

- name: Setup Python
uses: actions/setup-python@v7
- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.8.8
with:
python-version: '3.13'

- name: Setup uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
environments: dev

- name: Build sdist and wheel
run: >
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) &&
uv build
pixi run --as-is -e dev python -m build

- name: Upload sdist and wheel as artifacts
uses: actions/upload-artifact@v7
Expand All @@ -45,8 +42,8 @@ jobs:

- name: Install produced wheel
run: |
uv pip install dist/*.whl --system
pixi run --as-is -e dev pip install dist/*.whl --force-reinstall --no-deps

- name: Verify installation
run: |
python -m hextools --version
pixi run --as-is -e dev python -m hextools --version
Loading
Loading