Skip to content

👷 Add GitHub Actions CI (lint, tests, coverage, Docker build) - #23

Open
mdepasca-mqv wants to merge 6 commits into
Munich-Quantum-Software-Stack:developfrom
mdepasca-mqv:ci/add-github-actions
Open

mdepasca-mqv wants to merge 6 commits into
Munich-Quantum-Software-Stack:developfrom
mdepasca-mqv:ci/add-github-actions

Conversation

@mdepasca-mqv

@mdepasca-mqv mdepasca-mqv commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

What

MQP-API has had no CI on GitHub so far (only the Jira sync workflow; the old .gitlab-ci.yml targets the LRZ GitLab). This PR adds CI aligned with QDMI.

  • ci.yml runs on pull requests, pushes to develop, the merge queue and manual runs. Jobs:
    • Lint: installs the project with PDM and runs .pre-commit-config.yaml (black, isort, mypy, pylint, file checks, schema checks, zizmor)
    • Tests: pytest on Python 3.10 and 3.11 (the versions pyproject.toml allows), with coverage uploaded to Codecov (python flag)
    • Docker: builds the image from the Dockerfile without pushing it
    • 🚦 Check all-green job to use as the single required status check
  • .pre-commit-config.yaml: adds the GitHub workflow and Renovate schema checks and zizmor.
  • pyproject.toml: pytest-cov in the test group; default test values for QUANTUM_DB_PEPPER and QUANTUM_DB_TOKEN_PEPPER so pytest runs without extra setup; coverage measured on bqp_api.
  • jira-sync.yml: actions pinned by SHA, permissions scoped per job, and the Jira key passed to github-script through environment variables instead of being inserted into the script. No change in behaviour.
  • New: .github/renovate.json5 (Actions, Python, pre-commit, Dockerfile) and Release Drafter config and workflow (same as QDMI).

Fixes needed for CI to pass

  • tests/: the only test, test_job_creation, failed on develop. It sent an empty circuit to a target that doesn't exist and expected 200, while the endpoint returns 201 Created. The fixture now creates a target specification, a user group and a budget, and the test sends a small QASM circuit and checks for 201 and a job uuid.
  • bqp_api/version_1/__init__.py: import order (isort).
  • bqp_api/version_1/job_metrics.py: removed unused imports and variable (pylint).

Found along the way

GET /v1/job/<uuid>/stats calls bqp_database_access.job_metrics, which doesn't exist in MQP-Database-Access, so the endpoint always returns 404. I left the behaviour unchanged, added a TODO and silenced that one pylint no-member error so it doesn't block CI. This needs a fix in either repository.

Checked

  • Locally: pdm install -G dev -G test + pre-commit run --all-files pass, including zizmor; pytest passes on Python 3.10 and 3.11, coverage of bqp_api 56%.
  • On this PR: all CI jobs pass, including the Docker build.

Before merging

  • Codecov rejects uploads from this repository until it is registered (install the Codecov app for the org). Until then the upload step is set not to fail the build; switch fail_ci_if_error back to true, as in QDMI, once it is registered.
  • Install the Renovate GitHub app for the org.
  • Make 🚦 Check a required status check on develop.

Part of the MQSS CI alignment (QDMI as the reference).

🤖 Generated with Claude Code

https://claude.ai/code/session_01AeRqHJzCskBTisF7PVKYMa

@mdepasca-mqv
mdepasca-mqv marked this pull request as ready for review November 27, 2026 09:29
@mdepasca-mqv
mdepasca-mqv requested a review from Bmete7 November 27, 2026 09:30
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.

1 participant