Skip to content

Reformatted

Reformatted #39

Workflow file for this run

name: Build
on:
push:
pull_request:
jobs:
build:
name: Compile Java
runs-on: ubuntu-latest
container: wpilib/roborio-cross-ubuntu:2024-22.04
steps:
- uses: actions/checkout@v4
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Compile robot code
run: ./gradlew compileJava
test:
name: "Test Java"
runs-on: ubuntu-latest
container: wpilib/roborio-cross-ubuntu:2024-22.04
steps:
- uses: actions/checkout@v4
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run tests on robot code
run: ./gradlew test -PrunTests
format:
name: "Check Format Java"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Fetch all history and metadata
run: |
git checkout -b pr
git branch -f main origin/main
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Run formatter
run: ./gradlew spotlessCheck
lint:
name: "Lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- uses: pmd/pmd-github-action@v2
with:
rulesets: 'pmd-ruleset.xml'
analyzeModifiedFilesOnly: false