Skip to content

Add GitHub Actions CI to run pytest on every PR #4

@DogInfantry

Description

@DogInfantry

Summary

There is currently no CI pipeline. Add a GitHub Actions workflow that automatically runs pytest on every pull request and push to main.

Proposed Workflow

Create .github/workflows/ci.yml:

name: CI

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

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'
      - name: Install dependencies
        run: pip install -r requirements.txt
      - name: Run tests
        run: pytest
        env:
          SEC_USER_AGENT: 'CI Runner ci@example.com'

Acceptance Criteria

  • .github/workflows/ci.yml created
  • Workflow triggers on PR and push to main
  • pytest passes in the workflow
  • Badge added to README (optional but nice)

Notes

  • Tests must not make live API calls (use mocks) for CI to be stable
  • If some tests currently hit live APIs, flag them with @pytest.mark.integration and skip in CI

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions