Tests #1272
This file contains hidden or 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: | |
| pull_request: | |
| schedule: | |
| - cron: '23 1 * * *' | |
| jobs: | |
| pytest_minimal_requirements: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.9' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m venv venv_minimal | |
| source venv_minimal/bin/activate | |
| pip install toml | |
| python3 install_lowest_dependencies.py | |
| - name: Test with pytest | |
| run: | | |
| source venv_minimal/bin/activate | |
| pip install pytest | |
| pytest tests/ | |
| - name: Test examples | |
| run: | | |
| source venv_minimal/bin/activate | |
| pip install nbmake | |
| pytest --nbmake --nbmake-timeout 600 examples/ | |
| - name: clean | |
| run: | | |
| rm -rf venv_minimal | |
| pytest_qiskit_0_46: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.9' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m venv venv_qiskit_0_46 | |
| source venv_qiskit_0_46/bin/activate | |
| pip install .[examples] qiskit==0.46.3 qiskit-ibm-runtime==0.20.0 | |
| - name: Test with pytest | |
| run: | | |
| source venv_qiskit_0_46/bin/activate | |
| pip install pytest | |
| pytest tests/ | |
| - name: Test examples | |
| run: | | |
| source venv_qiskit_0_46/bin/activate | |
| pip install nbmake | |
| pytest --nbmake --nbmake-timeout 600 examples/ | |
| - name: clean | |
| run: | | |
| rm -rf venv_qiskit_0_46 | |
| pytest_qiskit_1: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.9' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m venv venv_qiskit_1 | |
| source venv_qiskit_1/bin/activate | |
| pip install .[examples] qiskit==1.1.2 qiskit-ibm-runtime==0.27.1 | |
| - name: Test with pytest | |
| run: | | |
| source venv_qiskit_1/bin/activate | |
| pip install pytest | |
| pytest tests/ | |
| - name: Test examples | |
| run: | | |
| source venv_qiskit_1/bin/activate | |
| pip install nbmake | |
| pytest --nbmake --nbmake-timeout 600 examples/ | |
| - name: clean | |
| run: | | |
| rm -rf venv_qiskit_1 | |
| pytest_latest: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: | | |
| 3.12 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m venv venv_latest | |
| source venv_latest/bin/activate | |
| pip install .[examples] | |
| - name: Test with pytest | |
| run: | | |
| source venv_latest/bin/activate | |
| pip install pytest | |
| pytest tests/ | |
| - name: Test examples | |
| run: | | |
| source venv_latest/bin/activate | |
| pip install nbmake | |
| pytest --nbmake --nbmake-timeout 600 examples/ | |
| - name: clean | |
| run: | | |
| rm -rf venv_latest |