Skip to content

Improve CI/CD pipeline with automated releases #15

@ahmed-sekka

Description

@ahmed-sekka

Description

Enhance the CI/CD pipeline to automate releases, improve test coverage reporting, and add more quality gates.

Current state

  • Basic PR validation workflow
  • Manual release process

Proposed improvements

1. Automated releases on tags

# Trigger on version tags
on:
  push:
    tags:
      - 'v*'
  • Build and publish to PyPI automatically
  • Generate changelog from commits
  • Create GitHub release with assets

2. Enhanced test matrix

  • Test on Python 3.10, 3.11, 3.12
  • Test on Ubuntu, macOS, Windows
  • Add integration tests with real documents

3. Code quality gates

  • Require minimum 60% code coverage
  • Add CodeQL security scanning
  • Add dependency vulnerability scanning (Dependabot)
  • Add license compliance check

4. Performance benchmarks

  • Run benchmarks on PRs
  • Compare with main branch
  • Fail if performance regresses >10%

5. Documentation deployment

  • Auto-deploy docs to GitHub Pages
  • Generate API reference from docstrings

Files to create/modify

  • .github/workflows/release.yml (new)
  • .github/workflows/pr-validation.yml (enhance)
  • .github/workflows/docs.yml (new)
  • .github/dependabot.yml (new)

Example release workflow

name: Release

on:
  push:
    tags:
      - 'v*'

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Build package
        run: python -m build
      - name: Publish to PyPI
        uses: pypa/gh-action-pypi-publish@release/v1
        with:
          password: ${{ secrets.PYPI_API_TOKEN }}
      - name: Create GitHub Release
        uses: softprops/action-gh-release@v1
        with:
          generate_release_notes: true

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions