[ci, formatting] add wpiformat #8
Workflow file for this run
This file contains 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 and Format | |
on: [push, pull_request] | |
jobs: | |
wpiformat: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install wpiformat | |
run: pip3 install wpiformat==2023.36 | |
- name: Run | |
run: wpiformat | |
- name: Check output | |
run: git --no-pager diff --exit-code HEAD | |
- name: Generate diff | |
run: git diff HEAD > wpiformat-fixes.patch | |
if: ${{ failure() }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: wpiformat fixes | |
path: wpiformat-fixes.patch | |
if: ${{ failure() }} | |
- name: Write to job summary | |
run: | | |
echo '```diff' >> $GITHUB_STEP_SUMMARY | |
cat wpiformat-fixes.patch >> $GITHUB_STEP_SUMMARY | |
echo '' >> $GITHUB_STEP_SUMMARY | |
echo '```' >> $GITHUB_STEP_SUMMARY | |
if: ${{ failure() }} |