Skip to content

ci: add GitHub Actions workflow for automated testing #18

Closed

Description

@tooniez

🚀 Feature Request: Add GitHub Actions CI/CD Workflow

Summary

The repository currently lacks a CI/CD pipeline to automatically run tests on pull requests and commits. Adding a GitHub Actions workflow will ensure code quality is maintained and prevent regressions from being merged into the main branch.

Current State

  • ❌ No .github/workflows/ci.yml or similar workflow file exists
  • ✅ Dependabot is configured for GitHub Actions updates only
  • ✅ Tests can be run locally via make test

Proposed Changes

1. Create .github/workflows/ci.yml

Add a comprehensive CI workflow that:

  • Runs on push to main and on all pull requests
  • Tests against multiple Python versions (3.9, 3.10, 3.11, 3.12)
  • Lints code with flake8 or ruff
  • Runs the full test suite via pytest
  • Uploads test results/coverage reports

Example workflow structure:

name: CI
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.9', '3.10', '3.11', '3.12']
    steps:
      - uses: actions/checkout@v4
      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python-version }}
      - name: Install dependencies
        run: |
          pip install -r requirements.txt
      - name: Run tests
        run: pytest

2. Update Dependabot Configuration

Extend .github/dependabot.yml to also monitor pip dependencies:

- package-ecosystem: "pip"
  directory: "/"
  schedule:
    interval: "weekly"

3. Add Code Quality Checks (Optional but recommended)

Consider adding:

  • flake8 or ruff for linting
  • black for code formatting
  • mypy for type checking
  • Test coverage reporting with pytest-cov

Acceptance Criteria

  • CI workflow runs automatically on PRs and pushes to main
  • Tests pass on all supported Python versions
  • Workflow badge added to README.md
  • Dependabot monitors pip dependencies

Benefits

  1. Quality Assurance: Catch bugs before they reach main
  2. Contributor Confidence: Contributors get immediate feedback on PRs
  3. Documentation: Badge shows project health to visitors
  4. Automation: Reduces manual testing burden

Related

  • Current Makefile has test commands ready for CI integration
  • pytest.ini is already configured for test discovery

Suggested commit message when implementing:

ci: add GitHub Actions workflow for automated testing

- Add CI workflow running tests on Python 3.9-3.12
- Add pip to Dependabot configuration
- Add CI badge to README

Fixes #[this issue number]

Activity

  1. tooniez commented on Oct 5, 2026

    @tooniez
    MemberAuthor

    Proposed solution for #18 — add .github/workflows/ci.yml:

    name: CI
    on:
      push:
        branches: [main]
      pull_request:
        branches: [main]
    jobs:
      test:
        runs-on: ubuntu-latest
        strategy:
          fail-fast: false
          matrix:
            python-version: ["3.9", "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 dependencies
          run: pip install -r requirements.txt
        - name: Run tests
          run: make test
        - name: Lint check (optional)
          run: python -m py_compile $(find . -name "*.py" | grep -v __pycache__)

    This satisfies the request: runs on push/PR to main, tests Python 3.9–3.12, uses make test, and includes a basic lint step (matching CONTRIBUTING.md). No .github/workflows/ directory exists; creating the file completes the CI setup.

    @tooniez

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions