From 244a46be3668019e9de34d54d8ce5836220da144 Mon Sep 17 00:00:00 2001 From: Andrea Date: Wed, 5 Feb 2025 15:02:04 +0400 Subject: [PATCH] build: Adding selfhosted file --- selfhosted | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 selfhosted diff --git a/selfhosted b/selfhosted new file mode 100644 index 0000000..21ef827 --- /dev/null +++ b/selfhosted @@ -0,0 +1,19 @@ +#!/bin/bash + +# Script for running the selfhosted tests on QPUs directly from GitHub +# Tests need to be copied to /tmp/ because coverage does not work with NFS + +cp -r src/qibojit/tests /tmp/ +cp pyproject.toml /tmp/ +cd /tmp/tests +source /nfs/users/github/actions-runner/_work/qibojit/qibojit/testenv/bin/activate +pytest +pytest_status=$? +if [[ $pytest_status -ne 0 ]] + then + exit $pytest_status +fi +cd - +mv /tmp/tests/coverage.xml . +mv /tmp/tests/htmlcov . +rm -r /tmp/tests