Skip to content

Hotfix qiskit

Hotfix qiskit #111

name: test_windows
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
# Execution strategy
strategy:
fail-fast: false
matrix:
python: ['3.8', '3.9', '3.10']
forest-sdk-version: [2.23.0]
# Run on a Windows machine
runs-on: windows-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
# Python setup
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
# Install MSBUILD ( Required to compile matplotlib )
- name: Add msbuild to PATH
uses: microsoft/[email protected]
# Install OpenQAOA
- name: Install OpenQAOA
shell: pwsh
run: |
python -m venv env
.\env\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install --upgrade setuptools
pip install wheel
make dev-install-tests
pip install ipykernel
# Install Rigetti Forest SDK and launch QUILC + QVM services
- name: Install Rigetti Forest SDK
shell: pwsh
run: |
echo "Downloading Rigetti Forest SDK"
Invoke-WebRequest -Uri https://downloads.rigetti.com/qcs-sdk/forest-sdk-${{matrix.forest-sdk-version}}.msi -OutFile forest-sdk-${{matrix.forest-sdk-version}}.msi
echo "Installing Rigetti Forest SDK"
Start-Process -Wait -FilePath "./forest-sdk-${{matrix.forest-sdk-version}}.msi" -ArgumentList "/passive","/log log.txt","/qn","License=YES" -PassThru
echo "Starting QUILC and QVM"
Start-Process -FilePath "C:\Program Files\Rigetti Computing\Forest SDK for Windows\quilc.exe" -ArgumentList "-S" -PassThru
Start-Process -FilePath "C:\Program Files\Rigetti Computing\Forest SDK for Windows\qvm.exe" -ArgumentList "-S" -PassThru
# Run all tests
- name: Run tests
shell: pwsh
run: |
.\env\Scripts\Activate.ps1
ipython kernel install --name "env" --user
pytest tests/ src/openqaoa-core/tests src/openqaoa-azure/tests src/openqaoa-braket/tests src/openqaoa-qiskit/tests -m 'not (qpu or api or docker_aws or braket_api or sim)'
Get-ChildItem -Directory | ForEach-Object { pytest $_.FullName -m 'not (qpu or api or docker_aws or braket_api or sim)'}