Skip to content

[ci, formatting] add wpiformat #12

[ci, formatting] add wpiformat

[ci, formatting] add wpiformat #12

Workflow file for this run

name: Lint and Format
on: [push, pull_request]
jobs:
wpiformat:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Fetch all history and metadata
run: git checkout -b pr
- 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() }}