Files
django-nepali-payments/.github/workflows/ci.yml
T
sankalp f81fd79ef6 ci: add Django 6.0 and 6.1 to test matrix
Django 6.x needs Python 3.12+, so the matrix now pins valid
python-django pairings instead of a cross product that would run
unsupported combos.
2026-09-03 01:02:25 +05:45

81 lines
2.2 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
lint:
name: Lint & format
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --extra dev
- name: Ruff check
run: uv run ruff check nepali_payment tests examples/payments
- name: Ruff format check
run: uv run ruff format --check nepali_payment tests examples/payments
test:
name: Test (Python ${{ matrix.python-version }} · Django ${{ matrix.django-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.11"
django-version: "4.2"
- python-version: "3.12"
django-version: "4.2"
- python-version: "3.12"
django-version: "5.0"
- python-version: "3.12"
django-version: "6.0"
- python-version: "3.12"
django-version: "6.1"
- python-version: "3.13"
django-version: "6.0"
- python-version: "3.13"
django-version: "6.1"
- python-version: "3.14"
django-version: "6.1"
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --extra dev
- name: Install Django ${{ matrix.django-version }}
run: uv pip install "Django~=${{ matrix.django-version }}.0"
- name: Run tests with coverage gate
run: uv run pytest --cov=nepali_payment --cov-fail-under=80
build:
name: Build package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
- name: Build sdist and wheel
run: uv build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/