This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
Update to reflect QRAO is in a released version of Qiskit Optimization #228
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: Minimum version tests | |
on: | |
push: | |
branches: | |
- main | |
- 'stable/**' | |
pull_request: | |
branches: | |
- main | |
- 'stable/**' | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: [3.7] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
sed -i 's/[>~]=/==/g' requirements-dev.txt requirements.txt | |
# The following line is a bit obscure, but the goal is to | |
# modify all version specifiers passed to `extras_require`, | |
# but not the one passed to `python_requires`. | |
sed -i 's/\([^"]\)[>~]=\([[:digit:]]\)/\1==\2/g' setup.py | |
cat <<- EOF > get_tox_minversion.py | |
import configparser | |
config = configparser.ConfigParser() | |
config.read("tox.ini") | |
print(config["tox"]["minversion"]) | |
EOF | |
pip install tox==$(python3 get_tox_minversion.py) | |
- name: Modify tox.ini for more thorough check | |
shell: bash | |
run: | | |
sed -i.bak -E '/#.*CI:[[:space:]]*skip-next-line/I{N;d;}' tox.ini | |
cat tox.ini | |
- name: Build the documentation | |
run: tox -edocs | |
- name: Test using tox environment | |
shell: bash | |
run: | | |
pver=${{ matrix.python-version }} | |
tox -epy${pver/./} |