Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI for ElasticLib formatting #139

Merged
merged 9 commits into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/elasticlib-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: ElasticLib

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:

jobs:
wpiformat-analyze:
name: "Verify Formatting"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch all history and metadata
run: |
git checkout -b pr
git branch -f main origin/main
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install wpiformat
run: pip3 install wpiformat==2024.50
- name: Run wpiformat
run: wpiformat -f Elastic.java elasticlib.h elasticlib.cpp elasticlib.py
working-directory: ./elasticlib
- name: Check output
run: git --no-pager diff --exit-code HEAD
10 changes: 9 additions & 1 deletion elasticlib/.styleguide
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,19 @@ cppSrcFileInclude {
modifiableFileExclude {
gradle/
assets/
build/
linux/
macos/
windows/
linux/
test_resources/
screenshots/
installer_setup_script.iss
README.md
}

includeOtherLibs {
^fmt/
^networktables/
^units/
^wpi/
}
1 change: 0 additions & 1 deletion elasticlib/elasticlib.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import json
from enum import Enum
from typing import Dict

from ntcore import NetworkTableInstance, PubSubOptions

Expand Down