Skip to content

Commit

Permalink
Add CI for ElasticLib formatting (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold872 authored Dec 14, 2024
1 parent ee1faac commit eea7ba6
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
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

0 comments on commit eea7ba6

Please sign in to comment.