2021-07-24 13:53:02 +00:00
|
|
|
name: 'Python Lint'
|
2020-09-10 13:41:37 +00:00
|
|
|
|
2022-08-02 14:05:31 +00:00
|
|
|
on:
|
2021-08-17 14:45:23 +00:00
|
|
|
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
|
|
|
|
2022-12-19 13:07:23 +00:00
|
|
|
env:
|
|
|
|
FBT_TOOLCHAIN_PATH: /runner/_work
|
|
|
|
SET_GH_OUTPUT: 1
|
|
|
|
|
2020-09-10 13:41:37 +00:00
|
|
|
jobs:
|
2021-07-24 13:53:02 +00:00
|
|
|
lint_python:
|
2022-08-02 14:05:31 +00:00
|
|
|
runs-on: [self-hosted,FlipperZeroShell]
|
2020-09-10 13:41:37 +00:00
|
|
|
steps:
|
2021-07-25 11:46:34 +00:00
|
|
|
- name: 'Decontaminate previous build leftovers'
|
|
|
|
run: |
|
2022-09-03 07:09:03 +00:00
|
|
|
if [ -d .git ]; then
|
|
|
|
git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
|
2021-07-25 11:46:34 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
- name: 'Checkout code'
|
2022-12-10 13:10:51 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-07-25 11:46:34 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2022-08-23 11:29:26 +00:00
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
2021-07-25 11:46:34 +00:00
|
|
|
|
2022-08-02 14:05:31 +00:00
|
|
|
- name: 'Check code formatting'
|
2022-12-19 13:07:23 +00:00
|
|
|
run: ./fbt lint_py
|