update codebase for black 24 #156
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, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
platform: [ubuntu-latest, windows-latest] | |
python-version: | |
["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.9"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} on platform ${{ matrix.platform }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Assert no dependencies for TinyFlux | |
run: python -c "import tinyflux" | |
- name: Install pip requirements | |
run: | | |
pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Check README | |
run: rstcheck README.rst | |
- name: Check code formatting | |
run: black --check tinyflux/ tests/ examples/ | |
- name: Check code style | |
run: flake8 tinyflux/ tests/ examples/ | |
- name: Check static typing | |
run: mypy tinyflux/ tests/ examples/ | |
- name: Run tests | |
run: coverage run --source tinyflux/ -m pytest && coverage report -m | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |