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