| name: CI | |
| on: | |
| push: | |
| branches: [master] | |
| paths: | |
| - "openg2g/**" | |
| - "tests/**" | |
| - "examples/**" | |
| - "scripts/lint.sh" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| - ".github/workflows/ci.yml" | |
| pull_request: | |
| paths: | |
| - "openg2g/**" | |
| - "tests/**" | |
| - "examples/**" | |
| - "scripts/lint.sh" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| - ".github/workflows/ci.yml" | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - run: uv sync | |
| - run: uv run --no-sync bash scripts/lint.sh | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| python-version: ${{ matrix.python-version }} | |
| - run: uv sync --no-default-groups --group test | |
| - run: uv run --no-sync pytest -v | |