Skip to content

Commit

Permalink
✨ add continuous testing workflow for running against the latest Qisk…
Browse files Browse the repository at this point in the history
…it main branch

Signed-off-by: burgholzer <burgholzer@me.com>
  • Loading branch information
burgholzer committed Mar 11, 2025
1 parent b7c3cfc commit 52ada37
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Qiskit Upstream Tests
on:
schedule:
# Run every Monday at 00:00 UTC
- cron: "0 0 * * 1"
pull_request:
paths:
- ".github/workflows/upstream.yml"
workflow_dispatch: # Allow manual triggering

jobs:
qiskit-upstream-tests:
name: 🐍⚛️
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-15, windows-2025]
uses: cda-tum/mqt-workflows/.github/workflows/reusable-qiskit-upstream.yml@v1.7
with:
runs-on: ${{ matrix.os }}
14 changes: 11 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def _run_tests(
session: nox.Session,
*,
install_args: Sequence[str] = (),
run_args: Sequence[str] = (),
uv_run_args: Sequence[str] = (),
pytest_run_args: Sequence[str] = (),
) -> None:
env = {"UV_PROJECT_ENVIRONMENT": session.virtualenv.location}
if os.environ.get("CI", None) and sys.platform == "win32":
Expand Down Expand Up @@ -77,8 +78,9 @@ def _run_tests(
"mqt-core", # build the project without isolation
"--verbose",
*install_args,
*uv_run_args,
"pytest",
*run_args,
*pytest_run_args,
*session.posargs,
"--cov-config=pyproject.toml",
env=env,
Expand All @@ -97,13 +99,19 @@ def minimums(session: nox.Session) -> None:
_run_tests(
session,
install_args=["--resolution=lowest-direct"],
run_args=["-Wdefault"],
pytest_run_args=["-Wdefault"],
)
env = {"UV_PROJECT_ENVIRONMENT": session.virtualenv.location}
session.run("uv", "tree", "--frozen", env=env)
session.run("uv", "lock", "--refresh", env=env)


@nox.session(reuse_venv=True, venv_backend="uv", python=PYTHON_ALL_VERSIONS)
def qiskit(session: nox.Session) -> None:
"""Tests against the latest version of Qiskit."""
_run_tests(session, uv_run_args=["--with", "qiskit @ git+https://github.com/Qiskit/qiskit.git"])


@nox.session(reuse_venv=True)
def docs(session: nox.Session) -> None:
"""Build the docs. Use "--non-interactive" to avoid serving. Pass "-b linkcheck" to check links."""
Expand Down

0 comments on commit 52ada37

Please sign in to comment.