Bump black from 19.10b0 to 24.3.0 #176
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: | |
push: | |
branches: ["*"] | |
pull_request: | |
branches: ["*"] | |
jobs: | |
test: | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9] | |
runs-on: ubuntu-latest | |
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 requirements.dev.txt | |
pip install . | |
- name: Test with pytest | |
run: | | |
pytest | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- name: Install pypa/build | |
run: | | |
python -m pip install build --user | |
- name: Build a binary wheel and a source tarball | |
run: | | |
python -m build --sdist --wheel --outdir dist/ . | |
- name: Archive the build artifacts | |
uses: actions/upload-artifact@v2 | |
if: ${{ github.ref == 'refs/heads/master' }} | |
with: | |
name: build-artifacts | |
path: dist | |
pypi-publish: | |
needs: [test, build] | |
if: ${{ github.ref == 'refs/heads/master' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v2 | |
with: | |
name: build-artifacts | |
path: dist | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
skip_existing: true | |
user: ${{ secrets.PYPI_USERNAME }} | |
password: ${{ secrets.PYPI_PASSWORD }} |