Add licence to pyproject.toml (#4) #11
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: lint | |
on: [push] | |
jobs: | |
black: | |
name: Check code formatting with black | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Extract black version from requirements-dev.txt | |
id: black_version | |
run: echo "::set-output name=version::$(grep -oP 'black==\K[^"]+' requirements-dev.txt)" | |
- uses: psf/black@stable | |
with: | |
src: ./src | |
version: ${{ steps.back_version.outputs.version }} | |
ruff: | |
name: Check code formatting with ruff | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Extract ruff version from requirements-dev.txt | |
id: ruff_version | |
run: echo "::set-output name=version::$(grep -oP 'ruff==\K[^"]+' requirements-dev.txt)" | |
- uses: chartboost/ruff-action@v1 | |
with: | |
version: ${{ steps.ruff_version.outputs.version }} | |
mypy: | |
name: Check type hints with mypy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- run: | | |
pip install -r requirements-dev.txt | |
mypy src/ |