-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
886c22f
commit 301a29b
Showing
2 changed files
with
65 additions
and
19 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,40 +29,86 @@ jobs: | |
sudo apt-get install -y clang-format-14 | ||
- name: Install wpiformat | ||
run: pip3 install wpiformat | ||
|
||
- name: Run wpiformat | ||
run: wpiformat -clang 14 | ||
|
||
# Check the diff | ||
- 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() }} | ||
|
||
buildifier: | ||
- name: Set up Go 1.15.x | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.15.x | ||
id: go | ||
|
||
- name: Install Buildifier | ||
run: | | ||
cd $(mktemp -d) | ||
GO111MODULE=on go get github.com/bazelbuild/buildtools/[email protected] | ||
- name: Install Unused Deps | ||
run: | | ||
cd $(mktemp -d) | ||
GO111MODULE=on go get github.com/bazelbuild/buildtools/[email protected] | ||
# Run formatters | ||
- name: Run wpiformat | ||
run: wpiformat -clang 14 | ||
- name: Run buildifier | ||
run: buildifier --lint=fix -r . | ||
|
||
# Check the diff | ||
- name: Check Output | ||
run: git --no-pager diff --exit-code HEAD | ||
- name: Generate diff | ||
run: git diff HEAD > buildifier-fixes.patch | ||
if: ${{ failure() }} | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: buildifier fixes | ||
path: buildifier-fixes.patch | ||
if: ${{ failure() }} | ||
|
||
spotless: | ||
# Run formatters | ||
- name: Run Spotless | ||
run: ./gradlew spotlessApply | ||
- name: Run unused deps | ||
run: unused_deps //... | ||
|
||
# Check the diff | ||
- name: Check Output | ||
run: git --no-pager diff --exit-code HEAD | ||
- name: Generate diff | ||
run: git diff HEAD > spotless-fixes.patch | ||
if: ${{ failure() }} | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: spotless fixes | ||
path: spotless-fixes.patch | ||
if: ${{ failure() }} | ||
|
||
unused_deps: | ||
- name: Set up Go 1.15.x | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.15.x | ||
id: go | ||
- name: Install Unused Deps | ||
run: | | ||
cd $(mktemp -d) | ||
GO111MODULE=on go get github.com/bazelbuild/buildtools/[email protected] | ||
# Check the diff | ||
- name: Check Output | ||
run: git --no-pager diff --exit-code HEAD | ||
- name: Generate diff | ||
run: git diff HEAD > wpiformat-fixes.patch | ||
run: git diff HEAD > unused-deps-fixes.patch | ||
if: ${{ failure() }} | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: wpiformat fixes | ||
path: wpiformat-fixes.patch | ||
name: unused deps fixes | ||
path: unused-deps-fixes.patch | ||
if: ${{ failure() }} |