64 lines
1.9 KiB
YAML
64 lines
1.9 KiB
YAML
name: 'Run Tests'
|
|
description: 'Run Tests'
|
|
inputs:
|
|
test_selection:
|
|
description: 'Positional Argument for stestr run'
|
|
default: ""
|
|
required: false
|
|
repo_install_command:
|
|
description: 'Optional command to run for installing repository under test'
|
|
default: "pip install ."
|
|
required: false
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Clone Qiskit/qiskit-neko PUBLIC repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: Qiskit/qiskit-neko
|
|
path: qiskit-neko
|
|
- name: Update setuptools and pip
|
|
run: |
|
|
pip install -U setuptools pip
|
|
shell: bash
|
|
|
|
# This can be removed when `ibm-platform-services` can build/install with the most recent of
|
|
# `setuptools`. `setuptools==72.0.0` and `ibm-platform-services==0.55.1` are a known-bad combo.
|
|
- name: Prebuild old-setuptools dependencies
|
|
shell: bash
|
|
run: |
|
|
set -e
|
|
python -m venv .build-deps
|
|
if [[ ${{ runner.os }} =~ [wW]indows ]]; then
|
|
.build-deps/Scripts/python -m pip install 'setuptools<72.0' wheel
|
|
.build-deps/Scripts/python -m pip wheel --no-build-isolation ibm-platform-services
|
|
else
|
|
.build-deps/bin/python -m pip install 'setuptools<72.0' wheel
|
|
.build-deps/bin/python -m pip wheel --no-build-isolation ibm-platform-services
|
|
fi
|
|
rm -rf .build-deps
|
|
|
|
- name: Install neko and its dependencies
|
|
run: |
|
|
pip install ./qiskit-neko
|
|
shell: bash
|
|
- name: Checkout base repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: repo_under_test
|
|
- name: Install repo under test
|
|
run: |
|
|
set -e
|
|
pushd repo_under_test
|
|
${{ inputs.repo_install_command }}
|
|
popd
|
|
shell: bash
|
|
- name: Run Unit Tests
|
|
env:
|
|
PYTHONWARNINGS: default
|
|
run: |
|
|
set -e
|
|
cd qiskit-neko
|
|
stestr run ${{ inputs.test_selection }}
|
|
shell: bash
|