Update to latest version of Cirq and pump Python Versions. #60
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: Continuous Integration | |
on: [pull_request] | |
jobs: | |
pytest: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.9', '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r blqs/requirements.txt | |
cat blqs_cirq/requirements.txt | grep -v blqs | xargs pip install | |
cat ci/requirements-dev.txt | grep pytest | xargs pip install | |
- name: Test with pytest | |
run: | | |
pytest blqs blqs_cirq | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.11' | |
architecture: 'x64' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
cat ci/requirements-dev.txt | grep black | xargs pip install | |
- name: Check format | |
run: | | |
black --check --line-length=100 blqs blqs_cirq | |
type-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.11' | |
architecture: 'x64' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r ci/requirements-dev.txt | |
pip install -r blqs/requirements.txt | |
cat blqs_cirq/requirements.txt | grep -v blqs | xargs pip install | |
- name: Run type checking | |
run: | | |
mypy --config-file=ci/mypy.ini blqs/blqs blqs_cirq/blqs_cirq | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.11' | |
architecture: 'x64' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
cat ci/requirements-dev.txt | grep pylint | xargs pip install | |
- name: Run linting | |
run: | | |
pylint --rcfile=ci/.pylintrc blqs_cirq/blqs_cirq/ blqs/blqs |