name: CI on: push: branches: [main] pull_request: branches: [main] jobs: test: runs-on: ubuntu-latest strategy: matrix: python-version: ["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 }} cache: "pip" - name: Install dependencies run: pip install -e ".[dev]" - name: Lint (ruff) run: ruff check . - name: Type check (mypy) run: mypy src/ - name: Run tests run: pytest --tb=short -q coverage: runs-on: ubuntu-latest if: github.ref == 'refs/heads/main' needs: test steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.12" cache: "pip" - name: Install dependencies run: pip install -e ".[dev]" - name: Run tests with coverage run: pytest --cov=markidocx --cov-report=xml --tb=short -q - name: Upload coverage report uses: actions/upload-artifact@v4 with: name: coverage-xml path: coverage.xml