add dd_strategy #2334
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: superstaq | |
on: | |
push: | |
branches: [main] | |
paths-ignore: | |
- 'general-superstaq/general_superstaq/_version.py' | |
pull_request: | |
branches: [main] | |
workflow_call: null | |
jobs: | |
format: | |
name: Format check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml', '**/*requirements.txt') }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ./checks-superstaq | |
- name: Format | |
run: | | |
checks/format_.py | |
lint: | |
name: Lint check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml', '**/*requirements.txt') }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ./checks-superstaq -e ./general-superstaq -e ./qiskit-superstaq -e ./cirq-superstaq -e ./supermarq-benchmarks | |
- name: Pylint | |
run: | | |
checks/pylint_.py --all | |
flake8: | |
name: Flake8 check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml', '**/*requirements.txt') }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ./checks-superstaq | |
- name: Flake8 | |
run: | | |
checks/flake8_.py | |
mypy: | |
name: Type check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml', '**/*requirements.txt') }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ./checks-superstaq -e ./general-superstaq[dev] -e ./qiskit-superstaq[dev] -e ./cirq-superstaq[dev] -e ./supermarq-benchmarks[dev] | |
- name: Type check | |
run: | | |
checks/mypy_.py | |
coverage: | |
name: Pytest and Coverage check | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11'] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml', '**/*requirements.txt') }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ./checks-superstaq -e ./general-superstaq[dev] -e ./qiskit-superstaq[dev] -e ./cirq-superstaq[dev] -e ./supermarq-benchmarks[dev] | |
- name: Coverage check | |
run: | | |
checks/coverage_.py | |
coverage-gss: | |
name: Standalone general-superstaq coverage check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ./checks-superstaq -e ./general-superstaq[dev] | |
- name: Coverage check | |
run: | | |
checks/coverage_.py general-superstaq | |
coverage-css: | |
name: Minimum cirq version coverage check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies, using minimum supported cirq version | |
run: | | |
cirq_version=$(sed cirq-superstaq/requirements.txt -ne 's/^cirq.=/cirq==/p') | |
echo "Using minimum cirq version: $cirq_version" | |
python -m pip install --upgrade pip | |
pip install "$cirq_version" -e ./checks-superstaq -e ./general-superstaq -e ./qiskit-superstaq -e ./cirq-superstaq[dev] | |
- name: Coverage check | |
run: | | |
checks/coverage_.py cirq-superstaq | |
coverage-qss: | |
name: Standalone qiskit-superstaq coverage check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies, using minimum supported qiskit version | |
run: | | |
qiskit_version=$(sed qiskit-superstaq/requirements.txt -ne 's/^qiskit.=/qiskit==/p') | |
echo "Using minimum qiskit version: $qiskit_version" | |
python -m pip install --upgrade pip | |
pip install "$qiskit_version" -e ./checks-superstaq -e ./general-superstaq -e ./qiskit-superstaq[dev] | |
- name: Coverage check | |
run: | | |
checks/coverage_.py qiskit-superstaq | |
pytest-mac: | |
name: Pytest macOS | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml', '**/*requirements.txt') }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ./checks-superstaq -e ./general-superstaq[dev] -e ./qiskit-superstaq[dev] -e ./cirq-superstaq[dev] -e ./supermarq-benchmarks[dev] | |
- name: Pytest-mac check | |
run: | | |
checks/pytest_.py | |
pytest-win: | |
name: Pytest Windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ./checks-superstaq -e ./general-superstaq[dev] -e ./qiskit-superstaq[dev] -e ./cirq-superstaq[dev] -e ./supermarq-benchmarks[dev] | |
- name: Pytest-win check | |
run: | | |
checks/pytest_.py | |
shell: bash | |
requirements: | |
name: Requirements check | |
runs-on: ubuntu-latest | |
timeout-minutes: 6 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml', '**/*requirements.txt') }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ./checks-superstaq -e ./general-superstaq[dev] -e ./qiskit-superstaq[dev] -e ./cirq-superstaq[dev] -e ./supermarq-benchmarks[dev] | |
- name: Requirements check | |
run: | | |
checks/requirements.py | |
notebook: | |
name: Notebook check | |
env: | |
SUPERSTAQ_API_KEY : ${{ secrets.SUPERSTAQ_API_KEY }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml', '**/*requirements.txt') }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ./checks-superstaq -e ./general-superstaq[dev] -e ./qiskit-superstaq[dev] -e ./cirq-superstaq[dev] -e ./supermarq-benchmarks[dev] | |
- name: Notebook check | |
run: | | |
checks/pytest_.py --notebook | |
docs: | |
name: Build docs | |
runs-on: ubuntu-latest | |
timeout-minutes: 8 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml', '**/*requirements.txt') }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ./checks-superstaq -e ./general-superstaq[dev] -e ./qiskit-superstaq[dev] -e ./cirq-superstaq[dev] -e ./supermarq-benchmarks[dev] | |
pip install -r ./docs/requirements.txt | |
sudo apt-get install pandoc | |
- name: Build docs | |
run: | | |
checks/build_docs.py |