From e54d884f0487252b1fd10a7f89db309bcd774697 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Sat, 19 Sep 2026 09:56:18 -0700 Subject: [PATCH] ci: consolidate CI into single rbs workflow Remove docker.yaml and main.yaml workflows in favor of the unified rbs.yml pipeline, which now runs the full audit, lint, test, build, and publish sequence via the Redux Build System. Drop the dry-run flag so pushes to main can actually publish images. Update README to document the new pipeline and reflect the updated badge link. --- .github/workflows/docker.yaml | 53 ----------------------------------- .github/workflows/main.yaml | 45 ----------------------------- .github/workflows/rbs.yml | 1 - README.md | 17 ++++++++++- 4 files changed, 16 insertions(+), 100 deletions(-) delete mode 100644 .github/workflows/docker.yaml delete mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml deleted file mode 100644 index 16247f0..0000000 --- a/.github/workflows/docker.yaml +++ /dev/null @@ -1,53 +0,0 @@ -name: docker build and push - -on: - push: - branches: ["main"] - -jobs: - docker: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to GHCR - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata - id: meta - uses: docker/metadata-action@v5 - with: - images: ghcr.io/reduxisu/quantumsolver - tags: | - type=raw,value=latest - type=sha,prefix=,format=short - - - name: Build and push - uses: docker/build-push-action@v6 - with: - context: . - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Prune old untagged versions - uses: actions/delete-package-versions@v5 - with: - package-name: quantumsolver - package-type: container - min-versions-to-keep: 10 - delete-only-untagged-versions: true diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml deleted file mode 100644 index 56e2d37..0000000 --- a/.github/workflows/main.yaml +++ /dev/null @@ -1,45 +0,0 @@ -name: build and unit tests - -on: - push: - branches: ["main"] - pull_request: - branches: ["main"] - -permissions: - contents: read - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.12", "3.13"] - - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - - name: Install uv - uses: astral-sh/setup-uv@v6 - with: - version: "0.10.9" - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: uv sync --all-groups --frozen - - - name: Audit dependencies - run: | - uv export --frozen --no-dev --no-emit-project --no-hashes \ - --format requirements-txt --output-file requirements.audit.txt - uv run pip-audit -r requirements.audit.txt - - - name: Format check (black) - run: uv run black --check . - - - name: Lint (ruff) - run: uv run ruff check . - - - name: Unit tests - run: uv run pytest -v --cov=quantumsolver --cov-fail-under=85 diff --git a/.github/workflows/rbs.yml b/.github/workflows/rbs.yml index cf0e00f..f0277df 100644 --- a/.github/workflows/rbs.yml +++ b/.github/workflows/rbs.yml @@ -17,6 +17,5 @@ concurrency: jobs: build-test: uses: ReduxISU/Redux_Build_System/.github/workflows/ci.yml@main - with: { dry-run: true } secrets: inherit diff --git a/README.md b/README.md index c1fbc1c..0ad2f48 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![build and unit tests](https://github.com/ReduxISU/quantumsolver/actions/workflows/main.yaml/badge.svg)](https://github.com/ReduxISU/quantumsolver/actions/workflows/main.yaml) +[![rbs](https://github.com/ReduxISU/quantumsolver/actions/workflows/rbs.yml/badge.svg)](https://github.com/ReduxISU/quantumsolver/actions/workflows/rbs.yml) This is a flask application that will integrates with [Redux](https://github.com/ReduxISU/Redux) to provide qiskit based solvers for problems. @@ -56,6 +56,21 @@ uv run ruff check . uv run black --check . ``` +## CI and publishing + +One workflow, `.github/workflows/rbs.yml`, runs the whole pipeline through the +[Redux Build System](https://github.com/ReduxISU/Redux_Build_System) inside this repo's devcontainer: +`audit → format-check → lint → unit-test (3.12, 3.13) → build → integration-test → push`. Gates and +thresholds live in `rbs.toml`. The same command runs locally: + +``` +rbs ci +``` + +On a push to `main`, and only if every gate passed, `push` publishes the exact image the +integration tests ran against to `ghcr.io/reduxisu/quantumsolver` as `:` and `:latest`. On +pull requests it reports `skipped`. + ## API Endpoints All solver endpoints accept `POST` with a JSON body and return a JSON object containing at minimum an `"answer"` field and a `"qasm"` field with the generated circuit.