Update for Qiskit 1.0 #206
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
check-style: | |
name: Check style | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.7' | |
- uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: poetry-${{ hashFiles('poetry.lock') }} | |
- name: Check style | |
run: | | |
. scripts/ci_install_deps | |
poetry run make check-style | |
check-types: | |
name: Check types | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.7' | |
- uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: poetry-${{ hashFiles('poetry.lock') }} | |
- name: Check types | |
run: | | |
. scripts/ci_install_deps | |
poetry run make check-types | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.7, 3.8, 3.9] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: poetry-${{ hashFiles('poetry.lock') }} | |
- name: Test (Python ${{ matrix.python-version }}) | |
run: | | |
. scripts/ci_install_deps | |
docker run --rm -itd -p 5555:5555 --entrypoint bash rigetti/quilc -c "curl -L -o qelib1.inc https://raw.githubusercontent.com/Qiskit/qiskit-terra/0.16.2/qiskit/qasm/libs/qelib1.inc && ./quilc -S -P" | |
docker run --rm -itd -p 5000:5000 rigetti/qvm -S | |
poetry run make test | |
docs-smoke-test: | |
name: Docs Smoke Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.7' | |
- uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: poetry-${{ hashFiles('poetry.lock') }} | |
- name: Build Docs | |
env: | |
SPHINXOPTS: "-W" | |
run: | | |
sudo apt update | |
sudo apt install pandoc | |
. scripts/ci_install_deps "-E docs" | |
poetry run make docs | |
check-licenses: | |
name: Check Dependency Licenses | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.7' | |
- uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: poetry-${{ hashFiles('poetry.lock') }} | |
- name: Check Licenses | |
# This is an exact match list, new dependencies will likely require their own entries | |
run: | | |
. scripts/ci_install_deps | |
poetry run pip-licenses --allow-only="MIT License;Apache Software License;BSD License;BSD 3-Clause;GNU Lesser General Public License v2 or later (LGPLv2+);Python Software Foundation License;Apache License 2.0;new BSD;Apache-2.0;ISCL;ISC License (ISCL);BSD;Mozilla Public License 2.0 (MPL 2.0)" |