Skip to content

Instantly share code, notes, and snippets.

@gideonshaked
Created January 19, 2021 15:44
Show Gist options
  • Save gideonshaked/4506125ddf8faef3791f463f96bef96b to your computer and use it in GitHub Desktop.
Save gideonshaked/4506125ddf8faef3791f463f96bef96b to your computer and use it in GitHub Desktop.
Pre-commit lint github actions workflow
name: Lint
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pre-commit
- name: Lint
run: pre-commit run --all-files --show-diff-on-failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment