From f3b9826ca4b463a3f1c5cc8a176ebde30b330d08 Mon Sep 17 00:00:00 2001 From: Philipp Emanuel Weidmann Date: Wed, 19 Nov 2025 09:45:54 +0530 Subject: [PATCH] Add CI workflow --- .github/workflows/ci.yml | 50 ++++++++++++++++++++++++++++++++++++++++ .gitignore | 3 +++ 2 files changed, 53 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0595276 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + checks: + name: Check and build (Python ${{ matrix.python-version }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13"] + + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + cache-dependency-glob: "uv.lock" + + - name: Set up Python ${{ matrix.python-version }} + run: uv python install ${{ matrix.python-version }} + + - name: Install dependencies + run: uv sync --all-extras --dev + + - name: Check formatting + run: uv run ruff format --check . + + - name: Lint and check import sorting + run: uv run ruff check --output-format=github --extend-select I . + + - name: Build package + run: uv build + + - name: Verify build artifacts + run: | + if [ ! -d "dist" ]; then + echo "Build failed: 'dist' directory not found." + exit 1 + fi + echo "Build artifacts found:" + ls -l dist/ diff --git a/.gitignore b/.gitignore index 9460e0f..a8f9825 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,9 @@ wheels/ # Virtual environments .venv +# Caches +/.ruff_cache/ + # Editors /.vscode/