Skip to content

Quantum Inspire integration tests #219

Quantum Inspire integration tests

Quantum Inspire integration tests #219

name: Quantum Inspire integration tests
on:
schedule:
- cron: '0 0 * * 0,4' # At 00:00 on Sunday and Thursday.
workflow_dispatch:
jobs:
integration-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-ci.txt
pip install wheel pytest pytest-cov pytest-mock flaky mypy --upgrade
- name: Install Plugin
run: |
python setup.py bdist_wheel
pip install dist/pennylane_quantuminspire*.whl
- name: Run Type Checking
run: |
MYPYPATH=. mypy --strict --ignore-missing-imports -p pennylane_quantuminspire
- name: Run QI-device tests
run: python -m pytest tests/test_qi_device.py --cov=pennylane_quantuminspire --cov-report=term-missing --cov-report=xml -p no:warnings --tb=native
env:
QI_TOKEN: ${{ secrets.QI_TOKEN }}
API_URL: https://api.quantum-inspire.com
- name: Run hardware backends tests
run: python -m pytest tests/test_spin2.py tests/test_starmon5.py --cov=pennylane_quantuminspire --cov-report=term-missing --cov-report=xml -p no:warnings --tb=native
env:
QI_TOKEN: ${{ secrets.QI_TOKEN }}
API_URL: https://api.quantum-inspire.com
- name: Run simulator backends tests
run: python -m pytest tests/test_qxsim.py --cov=pennylane_quantuminspire --cov-report=term-missing --cov-report=xml -p no:warnings --tb=native
env:
QI_TOKEN: ${{ secrets.QI_TOKEN }}
API_URL: https://api.quantum-inspire.com
device-tests:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-ci.txt
pip install wheel pytest pytest-cov pytest-mock flaky --upgrade
- name: Install Plugin
run: |
python setup.py bdist_wheel
pip install dist/pennylane*.whl
- name: Run tests
run: |
python -m pytest tests/test_pl_device_test.py -p no:warnings
env:
API_URL: https://api.quantum-inspire.com
QI_TOKEN: ${{ secrets.QI_TOKEN }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.4
with:
file: ./coverage.xml