diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..27fa983 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,32 @@ +name: Lint + +on: + push: + branches: master + pull_request: + types: [opened, synchronize, reopened] + +env: + PYTHONUNBUFFERED: "1" + FORCE_COLOR: "1" + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + submodules: true + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: 3.8 + + - name: Install Hatch + run: pip install --upgrade hatch + + - name: Lint typing and code style + run: hatch run lint:all diff --git a/README.md b/README.md index 78ebb46..5dd451b 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![PyPI - Version](https://img.shields.io/pypi/v/eolib.svg)](https://pypi.org/project/eolib) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/eolib.svg)](https://pypi.org/project/eolib) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Cirras_eolib-python&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Cirras_eolib-python) +[![Lint](https://github.com/Cirras/eolib-python/actions/workflows/lint.yml/badge.svg?event=push)](https://github.com/Cirras/eolib-python/actions/workflows/lint.yml) A core Python library for writing applications related to Endless Online.