Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨Add continuous testing workflow for Qiskit main branch #860

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
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

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

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 }}
19 changes: 16 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] = (),
extra_commands: 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 All @@ -69,6 +70,10 @@ def _run_tests(
*install_args,
env=env,
)
session.run(
*extra_commands,
env=env,
)
session.run(
"uv",
"run",
Expand All @@ -78,7 +83,7 @@ def _run_tests(
"--verbose",
*install_args,
"pytest",
*run_args,
*pytest_run_args,
*session.posargs,
"--cov-config=pyproject.toml",
env=env,
Expand All @@ -97,13 +102,21 @@ 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, extra_commands=["uv", "pip", "install", "qiskit @ git+https://github.com/Qiskit/qiskit.git"])
env = {"UV_PROJECT_ENVIRONMENT": session.virtualenv.location}
session.run("uv", "pip", "show", "qiskit", env=env)


@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
Loading