chore(deps-dev): bump black from 22.6.0 to 24.3.0 #387
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: CI | |
on: | |
push: | |
branches: | |
pull_request: | |
release: | |
types: [published] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
format_lint: | |
name: Formatting and linting | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.10'] | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set up repo | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install pipenv | |
run: pip install pipenv==2021.5.29 | |
- name: Install dependencies | |
run: pipenv install --dev --deploy --python ${{ matrix.python-version }} | |
- name: Format code | |
run: | | |
set -e | |
pipenv run ./scripts/format.sh | |
[ -z "$(git status --porcelain=v1)" ] | |
- name: Lint code | |
run: pipenv run ./scripts/check.sh | |
test: | |
name: Tests | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.7, 3.8, 3.9, '3.10'] | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set up repo | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install pipenv | |
run: pip install pipenv==2021.5.29 | |
- name: Install dependencies | |
run: pipenv install --dev --deploy --python ${{ matrix.python-version }} | |
- name: Run tests | |
run: pipenv run pytest --cov-report=xml --verbose --showlocals tests/ | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
name: ${{ matrix.os }}-${{ matrix.python-version }} | |
fail_ci_if_error: true | |
env_vars: OS,PYTHON_VERSION,JOB | |
env: | |
JOB: ${{ github.job }} | |
OS: ${{ matrix.os }} | |
PYTHON_VERSION: ${{ matrix.python-version }} | |
build: | |
name: Build | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.7, 3.8, 3.9, '3.10'] | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set up repo | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install setuptools and wheel | |
run: pip install 'setuptools>=46.4.0' wheel | |
- name: Build package | |
run: python setup.py sdist bdist_wheel | |
build_docs: | |
name: Build docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up repo | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
- name: Install Sphinx | |
run: pip install sphinx sphinx_rtd_theme | |
- name: Build docs | |
run: make -C docs html | |
publish: | |
name: Publish | |
needs: | |
- format_lint | |
- test | |
- build | |
runs-on: ubuntu-latest | |
# Only run for new releases | |
if: github.event_name == 'release' | |
steps: | |
- name: Set up repo | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
- name: Install setuptools and wheel | |
run: pip install 'setuptools>=46.4.0' wheel | |
- name: Build package | |
run: python setup.py sdist bdist_wheel | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@v1.3.1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} |