Skip to content

Drop 3.7,3.8 and add 3.11,3.12 #154

Drop 3.7,3.8 and add 3.11,3.12

Drop 3.7,3.8 and add 3.11,3.12 #154

Workflow file for this run

name: Main
on:
push:
pull_request:
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python_version: ['3.9', '3.10', '3.11', '3.12']
install_extras: ['tests', 'plotting,fancy_progressbar,tests', 'plotting,bloch_sphere_visualization,fancy_progressbar,doc,tests']
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
run: |
python -m pip install --upgrade pip
pip install .[${{ matrix.install_extras }}]
- name: Test with pytest
run: |
pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
name: ${{ matrix.python }} - ${{ matrix.install_extras }}
env_vars: OS,PYTHON
fail_ci_if_error: true
release:
name: Publish to PyPi
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.10
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build package
run: |
python setup.py sdist bdist_wheel
- name: Publish package
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload dist/*