name: Test and Validate on: push: branches: [ main, develop ] pull_request: branches: [ main ] jobs: test: runs-on: ubuntu-latest strategy: matrix: python-version: ["3.10", "3.11", "3.12", "3.13"] fail-fast: false steps: - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Install uv uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 - name: Install dependencies run: uv sync --all-extras --locked - name: Lint with ruff run: | uv run --locked ruff check . uv run --locked ruff format --check . - name: Type check with mypy run: uv run --locked mypy jyotishganit/ - name: Test with pytest run: uv run --locked pytest tests/ --cov=jyotishganit --cov-report=xml - name: Upload coverage to Codecov if: matrix.python-version == '3.11' uses: codecov/codecov-action@v5 with: file: ./coverage.xml build: needs: test runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Set up Python uses: actions/setup-python@v6 with: python-version: "3.11" - name: Install uv uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 - name: Install build dependencies run: uv sync --all-extras --locked - name: Build package run: uv run --locked python -m build - name: Check package run: uv run --locked twine check dist/* - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: dist path: dist/