Skip to content

ci: add github actions workflow for automated testing - #25

Merged
tooniez merged 7 commits into
mainfrom
18-ci-add-github-actions-workflow-for-automated-testing
Oct 6, 2026
Merged

tooniez merged 7 commits into
mainfrom
18-ci-add-github-actions-workflow-for-automated-testing

Conversation

@tooniez

@tooniez tooniez commented Oct 5, 2026

Copy link
Copy Markdown
Member

Summary

Add GitHub Actions CI/CD workflow for automated testing

Description

This PR adds a .github/workflows/ci.yml file that provides continuous integration testing. The workflow runs on push and pull requests to main, testing against Python versions 3.9, 3.10, 3.11, and 3.12. It installs dependencies from requirements.txt and runs make test along with a basic lint check using py_compile.

Changes

  • Creates .github/workflows/ci.yml with CI pipeline
  • Configures matrix testing across Python 3.9, 3.10, 3.11, 3.12
  • Adds make test step to run pytest
  • Includes optional lint check with python -m py_compile

Related Issues

Closes #18

@tooniez tooniez linked an issue Oct 5, 2026 that may be closed by this pull request
4 tasks
@tooniez

tooniez commented Oct 5, 2026

Copy link
Copy Markdown
Member Author

CI Failure Analysis

All 4 matrix jobs fail at the make test step with the same root cause:

AttributeError: 'TerminalReporter' object has no attribute '_sessionstarttime'

Source: pytest_html_reporter/plugin.py:262 — it accesses terminalreporter._sessionstarttime, but pytest 9 renamed it to _session_start.

This is a pre-existing requirements conflict, not a workflow bug. The workflow itself is fine — it correctly surfaces the problem.

Proposed fix

Pin pytest-html-reporter to a version compatible with pytest 9, or pin pytest to <9.

Option A (preferred): Upgrade pytest-html-reporter:
pytest-html-reporter>=0.2.10

Option B: Cap pytest at 8.x to match the pinned plugin:
pytest<9

Secondary issues in the workflow (suggested improvements)

  1. Missing trailing newline — ci.yml has no newline at EOF. Add one.
  2. Lint step is noisy — py_compile one-liner may fail on site-packages paths. Scope to tracked files:
    python -m py_compile api/init.py
    api/clients/init.py
    api/clients/base_client.py
    conftest.py
    tests/init.py
    tests/test_basic_api.py
    tests/test_environment_config.py
    utils/init.py
    utils/validators.py
  3. No caching — pip reinstall on every run. Add actions/cache for ~/.cache/pip.
  4. fail-fast: false is good — keep it so all versions report.

Action needed

Update requirements.txt (Option A or B), then CI will pass. The workflow file needs only the minor newline fix.

@tooniez tooniez self-assigned this Oct 5, 2026
@tooniez
tooniez merged commit e032457 into main Oct 6, 2026
3 of 4 checks passed
@tooniez
tooniez deleted the 18-ci-add-github-actions-workflow-for-automated-testing branch October 6, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: add GitHub Actions workflow for automated testing

1 participant