Skip to content

feat: add .ctxengignore support — v0.1.1 #6

feat: add .ctxengignore support — v0.1.1

feat: add .ctxengignore support — v0.1.1 #6

Workflow file for this run

name: CI
on:
push:
branches: [main, dev]
pull_request:
branches: [main]
jobs:
test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install ctxeng + dev deps
run: |
pip install -e ".[dev]"
- name: Lint with ruff
run: ruff check ctxeng/
- name: Type check with mypy
run: mypy ctxeng/ --ignore-missing-imports
continue-on-error: true
- name: Run tests with coverage
run: |
pytest tests/ --cov=ctxeng --cov-report=xml --cov-report=term-missing
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Build package
run: |
pip install hatchling
python -m hatchling build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}