fb305eddb2
* Fix branch artifacts naming * Port submodules fix from build.yml * Github: port decontamination to python lint action * Github: skip decontamination on non existing repos * Github: skip submodules python lint Co-authored-by: あく <alleteam@gmail.com>
34 lines
700 B
YAML
34 lines
700 B
YAML
name: 'Python Lint'
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- '**.py'
|
|
pull_request:
|
|
|
|
jobs:
|
|
lint_python:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 'Cleanup workspace'
|
|
uses: AutoModality/action-clean@v1
|
|
|
|
- name: 'Decontaminate previous build leftovers'
|
|
run: |
|
|
if [ -d .git ]
|
|
then
|
|
git submodule status \
|
|
|| git checkout `git rev-list --max-parents=0 HEAD | tail -n 1`
|
|
fi
|
|
|
|
- name: 'Checkout code'
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: 'Setup python'
|
|
uses: actions/setup-python@v2
|
|
|
|
- name: 'Check python code with black'
|
|
uses: psf/black@20.8b1
|