Validate source formatting (#28028)

This commit is contained in:
Scott Lahteine 2025-09-05 20:30:39 -05:00 committed by GitHub
parent 67dc3e432f
commit 4bca73dc5a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 448 additions and 244 deletions

View file

@ -9,14 +9,14 @@ name: CI - Validate boards.h
on:
pull_request:
branches:
- bugfix-2.1.x
- bugfix-2.1.x
paths:
- 'Marlin/src/core/boards.h'
- "Marlin/src/core/boards.h"
push:
branches:
- bugfix-2.1.x
- bugfix-2.1.x
paths:
- 'Marlin/src/core/boards.h'
- "Marlin/src/core/boards.h"
jobs:
validate_pins_files:
@ -26,23 +26,23 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Check out the PR
uses: actions/checkout@v4
- name: Check out the PR
uses: actions/checkout@v4
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-boards-v1
restore-keys: |
${{ runner.os }}-pip-boards-
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-validation-v1
restore-keys: |
${{ runner.os }}-pip-validation-
- name: Select Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
architecture: 'x64'
- name: Select Python 3.9
uses: actions/setup-python@v5
with:
python-version: "3.9"
architecture: "x64"
- name: Validate core/boards.h
run: |
make validate-boards -j
- name: Validate core/boards.h
run: |
make validate-boards -j

40
.github/workflows/ci-validate-lines.yml vendored Normal file
View file

@ -0,0 +1,40 @@
#
# ci-validate-lines.yml
# Validate that all text files are unchanged by linesformat.py
#
name: CI - Validate Source Files
on:
pull_request:
branches:
- bugfix-2.1.x
- 2.1.x
push:
branches:
- bugfix-2.1.x
- 2.1.x
jobs:
validate_source_files:
name: Validate Source Files
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-22.04
steps:
- name: Check out the PR
uses: actions/checkout@v4
- name: Cache node_modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-npm-lines-v1
restore-keys: |
${{ runner.os }}-npm-lines-
- name: Validate text file formatting
run: |
npm install --save-dev prettier
make validate-lines -j

View file

@ -8,18 +8,18 @@ name: CI - Validate Pins Files
on:
pull_request:
branches:
- bugfix-2.1.x
- bugfix-2.1.x
# Cannot be enabled on 2.1.x until it contains the unit test framework
#- 2.1.x
paths:
- 'Marlin/src/pins/*/**'
- "Marlin/src/pins/*/**"
push:
branches:
- bugfix-2.1.x
- bugfix-2.1.x
# Cannot be enabled on 2.1.x until it contains the unit test framework
#- 2.1.x
paths:
- 'Marlin/src/pins/*/**'
- "Marlin/src/pins/*/**"
jobs:
validate_pins_files:
@ -29,23 +29,23 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Check out the PR
uses: actions/checkout@v4
- name: Check out the PR
uses: actions/checkout@v4
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-pins-v1
restore-keys: |
${{ runner.os }}-pip-pins-
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-validation-v1
restore-keys: |
${{ runner.os }}-pip-validation-
- name: Select Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
architecture: 'x64'
- name: Select Python 3.9
uses: actions/setup-python@v5
with:
python-version: "3.9"
architecture: "x64"
- name: Validate all pins files
run: |
make validate-pins -j
- name: Validate all pins files
run: |
make validate-pins -j