2021-07-24 13:53:02 +00:00
|
|
|
name: 'Python Lint'
|
2020-09-10 13:41:37 +00:00
|
|
|
|
2021-08-17 14:45:23 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- dev
|
|
|
|
- "release*"
|
|
|
|
tags:
|
2021-08-19 09:56:42 +00:00
|
|
|
- '*'
|
2021-08-17 14:45:23 +00:00
|
|
|
pull_request:
|
2021-07-24 13:53:02 +00:00
|
|
|
|
2020-09-10 13:41:37 +00:00
|
|
|
jobs:
|
2021-07-24 13:53:02 +00:00
|
|
|
lint_python:
|
2020-09-10 13:41:37 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-07-25 11:46:34 +00:00
|
|
|
- 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
|