35 lines
824 B
YAML

name: Lint and format
on: push
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: "3.x"
architecture: "x64"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/dev.txt
- name: Lint with pylint
run: pylint app --extension-pkg-allow-list=lxml
- name: Format with black
run: black .
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4.1.2
with:
commit_message: Apply formatting changes
branch: ${{ github.head_ref }}