build(deps): Bump esbuild from 0.24.0 to 0.25.0 in /applications/system/js_app/packages/fz-sdk in the npm_and_yarn group across 1 directory #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'Lint sources & check submodule integrity' | |
| on: | |
| pull_request: | |
| env: | |
| TARGETS: f7 | |
| FBT_TOOLCHAIN_PATH: /runner/_work | |
| SET_GH_OUTPUT: 1 | |
| permissions: write-all | |
| jobs: | |
| lint_sources_check_submodules: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 'Wipe workspace' | |
| run: sudo find ./ -mount -maxdepth 1 -exec rm -rf {} \; | |
| - name: 'Checkout code' | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| ref: ${{ github.sha }} | |
| - name: 'Check protobuf branch' | |
| run: | | |
| set -e | |
| sudo -i | |
| git submodule update --init; | |
| SUB_PATH="assets/protobuf"; | |
| SUB_BRANCH="dev"; | |
| SUB_COMMITS_MIN=40; | |
| cd "$SUB_PATH"; | |
| SUBMODULE_HASH="$(git rev-parse HEAD)"; | |
| BRANCHES=$(git branch -r --contains "$SUBMODULE_HASH"); | |
| COMMITS_IN_BRANCH="$(git rev-list --count dev)"; | |
| if [ $COMMITS_IN_BRANCH -lt $SUB_COMMITS_MIN ]; then | |
| echo "name=fails::error" >> $GITHUB_OUTPUT; | |
| echo "::error::Error: Too few commits in $SUB_BRANCH of submodule $SUB_PATH: $COMMITS_IN_BRANCH(expected $SUB_COMMITS_MIN+)"; | |
| exit 1; | |
| fi | |
| if ! grep -q "/$SUB_BRANCH" <<< "$BRANCHES"; then | |
| echo "name=fails::error" >> $GITHUB_OUTPUT; | |
| echo "::error::Error: Submodule $SUB_PATH is not on branch $SUB_BRANCH"; | |
| exit 1; | |
| fi | |
| - name: 'Check for new TODOs' | |
| id: check_todos | |
| working-directory: ./ | |
| run: | | |
| set -e | |
| sudo -i | |
| # Use our new TODO tracker script | |
| python scripts/tools/todo_tracker.py --root . --output pr_todo_report --format json | |
| # Check if new TODOs have ticket numbers | |
| cat pr_todo_report.json | jq '.items[] | select(.ticket == "")' > new_todos_without_tickets.json | |
| if [ -s new_todos_without_tickets.json ]; then | |
| echo "Error: Missing ticket number in \`TODO\` comment(s)" >> $GITHUB_STEP_SUMMARY; | |
| echo "Please add ticket numbers to all new TODOs (e.g., TODO FL-XXXX: description)" >> $GITHUB_STEP_SUMMARY; | |
| cat new_todos_without_tickets.json | jq -r '"\(.file):\(.line): \(.line_content)"' >> $GITHUB_STEP_SUMMARY; | |
| exit 1; | |
| else | |
| echo "No new TODOs without tickets found" >> $GITHUB_STEP_SUMMARY; | |
| fi | |
| - name: 'Check Python code formatting' | |
| id: syntax_check_py | |
| if: always() | |
| run: | | |
| set -e | |
| sudo -i | |
| ./fbt -s lint_py 2>&1 | tee lint-py.log; | |
| if [ "${PIPESTATUS[0]}" -ne 0 ]; then | |
| # Save multiline output | |
| echo "errors=1" >> $GITHUB_OUTPUT; | |
| printf "Python Lint errors:\n\`\`\`\n" >> $GITHUB_STEP_SUMMARY; | |
| echo "$(cat lint-py.log)" >> $GITHUB_STEP_SUMMARY; | |
| printf "\n\`\`\`\n" >> $GITHUB_STEP_SUMMARY; | |
| exit 1; | |
| else | |
| echo "Python Lint: all good ✨" >> $GITHUB_STEP_SUMMARY; | |
| fi | |
| - name: 'Check C++ code formatting' | |
| id: syntax_check_cpp | |
| if: always() | |
| run: | | |
| set -e | |
| sudo -i | |
| ./fbt -s lint 2>&1 | tee lint-cpp.log; | |
| if [ "${PIPESTATUS[0]}" -ne 0 ]; then | |
| # Save multiline output | |
| echo "errors=1" >> $GITHUB_OUTPUT; | |
| printf "C Lint errors:\n\`\`\`\n" >> $GITHUB_STEP_SUMMARY; | |
| echo "$(cat lint-cpp.log)" >> $GITHUB_STEP_SUMMARY; | |
| printf "\n\`\`\`\n" >> $GITHUB_STEP_SUMMARY; | |
| exit 1; | |
| else | |
| echo "C Lint: all good ✨" >> $GITHUB_STEP_SUMMARY; | |
| fi | |
| - name: 'Check image assets' | |
| if: always() | |
| run: | | |
| set -e | |
| sudo -i | |
| ./fbt -s lint_img 2>&1 | tee lint-assets.log; | |
| if [ "${PIPESTATUS[0]}" -ne 0 ]; then | |
| # Save multiline output | |
| echo "errors=1" >> $GITHUB_OUTPUT; | |
| printf "Image Lint errors:\n\`\`\`\n" >> $GITHUB_STEP_SUMMARY; | |
| echo "$(cat lint-assets.log)" >> $GITHUB_STEP_SUMMARY; | |
| printf "\n\`\`\`\n" >> $GITHUB_STEP_SUMMARY; | |
| exit 1; | |
| else | |
| echo "Image Lint: all good ✨" >> $GITHUB_STEP_SUMMARY; | |
| fi | |
| - name: Report code formatting errors | |
| if: ( steps.syntax_check_py.outputs.errors || steps.syntax_check_cpp.outputs.errors ) && github.event.pull_request | |
| run: | | |
| set -e | |
| sudo -i | |
| echo "Code formatting errors found"; | |
| echo "Please run './fbt format' or './fbt format_py' to fix them"; | |
| exit 1; |