This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
Development version tests #686
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: Development version tests | |
on: | |
push: | |
branches: | |
- main | |
- 'stable/**' | |
pull_request: | |
branches: | |
- main | |
- 'stable/**' | |
schedule: | |
- cron: '0 1 * * *' | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: [3.8, '3.10'] | |
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 | |
# First, save the original requirements.txt aside and use | |
# the original in setup.py. | |
cp -a requirements.txt requirements.orig.txt | |
sed -i 's/requirements\.txt/requirements.orig.txt/' setup.py | |
echo "include requirements.orig.txt" >> MANIFEST.in | |
# Second, update requirements[-dev].txt in place to use the | |
# development (git) versions of all Qiskit packages. | |
sed -i 's|^\(qiskit[A-Za-z-]*\).*|git+https://github.com/Qiskit/\1.git|' requirements-dev.txt requirements.txt | |
pip install 'tox<4' | |
- 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: Test using tox environment | |
shell: bash | |
run: | | |
pver=${{ matrix.python-version }} | |
tox -epy${pver/./} |