Updated black, but be liberal in the dependency setting #282
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
jobs: | |
complete_coveralls: | |
needs: test-multi-python | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel-finished: true | |
lint-multi-os: | |
name: Lint ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- uses: actions/cache@v4 | |
with: | |
key: v0-${{ runner.os }}-pip-lint-${{ hashFiles('setup.py') }} | |
path: ~/.cache/pip | |
restore-keys: | | |
v0-${{ runner.os }}-pip-lint- | |
v0-${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[lint] | |
- name: Run black | |
run: black --check --verbose . | |
- name: Run flake8 | |
run: flake8 --statistics . | |
- name: Run flynt | |
run: flynt -vdf -tc -ll 1000 . | |
- name: Run isort | |
run: isort -cv . | |
strategy: | |
matrix: | |
os: [ macOS-latest, ubuntu-latest, windows-latest ] | |
test-multi-os: | |
name: Test ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- uses: actions/cache@v4 | |
with: | |
key: v0-${{ runner.os }}-pip-test-${{ hashFiles('setup.py') }} | |
path: ~/.cache/pip | |
restore-keys: | | |
v0-${{ runner.os }}-pip-test- | |
v0-${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[test] | |
- name: Test with pytest | |
run: pytest | |
strategy: | |
matrix: | |
os: [ macOS-latest, ubuntu-latest, windows-latest ] | |
test-multi-python: | |
name: Test Python ${{ matrix.python-version }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v4 | |
with: | |
key: v0-${{ runner.os }}-pip-test-${{ hashFiles('setup.py') }} | |
path: ~/.cache/pip | |
restore-keys: | | |
v0-${{ runner.os }}-pip-test- | |
v0-${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[ci,test] | |
- name: Test with pytest | |
run: coverage run --source docstrfmt --module pytest | |
- env: | |
COVERALLS_PARALLEL: true | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
name: Submit to coveralls | |
run: coveralls --service=github | |
- name: Check coverage | |
run: coverage report -m --fail-under=100 | |
strategy: | |
matrix: | |
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] | |
name: CI | |
on: [ pull_request, push ] |