From 984890515feb75e8d7f2f593e3202f1baa18d656 Mon Sep 17 00:00:00 2001 From: Huang Qi Date: Tue, 12 May 2026 01:33:51 +0800 Subject: [PATCH] ci: add GitHub Actions workflow (library + dev jobs) --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 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..c45d3db --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + library: + name: Library tests (no torch) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + python: ["3.12", "3.13"] + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v3 + - run: uv venv --python ${{ matrix.python }} + - run: uv pip install -e . pytest + - run: uv run pytest tests/unit -v + + dev: + name: Full dev suite (with torch) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + python: ["3.12", "3.13"] + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v3 + - run: uv sync --group dev --python ${{ matrix.python }} + - run: uv run pytest tests/ -v