Create validate_python.yml

This commit is contained in:
Edward Firmo
2024-02-23 00:05:43 +01:00
parent 96dc528237
commit 29a22ad8dd

29
.github/workflows/validate_python.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
---
name: Validate Python (flake8)
# yamllint disable-line rule:truthy
on:
push:
paths:
- '*.py'
jobs:
flake8_py3:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.7.4
architecture: x64
- name: Checkout PyTorch
uses: actions/checkout@master
- name: Install flake8
run: pip install flake8
- name: Run flake8
uses: suo/flake8-github-action@releases/v1
with:
checkName: 'flake8_py3' # NOTE: this needs to be the same as the job name
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
...