Skip to content

OakvilleDynamics/frc-robot-template

Repository files navigation

Oakville Dynamics FRC Robot Template

A template for FRC robots using GradleRIO and WPILib

Prepackaged with GitHub Actions for CI/CD, Qodana for static analysis, CodeQL for static analysis and security scanning, Spotless for code formatting, and Gradle Validation for validating the Gradle wrapper

Build Status

Action Status
CI Build
Qodana Qodana
CodeQL CodeQL Scanning
Spotless Syntax Check

How to use

  1. Create a template of this repository
  2. Follow GitHub prompts for creating a repository
  3. Clone newly created repository
  4. Open the project in your WPILib Visual Studio Code (VS Code) after cloning
  5. Start hacking away!

Note

You should also change the README.md file to reflect your project for build statuses and other badges, otherwise the CI jobs listed here will point to the template

Include other changes that are made to help users understand your project

Features

  • Preconfigured setup for GitHub Actions (helpful for CI/CD)
    • Build action for building the robot code (helpful for ensuring code compiles)
    • Unit testing for ensuring your code does function as intended
    • Qodana action for static analysis (helpful for finding bugs and code smells)
    • CodeQL action for static analysis and security scanning (helpful for finding bugs and security vulnerabilities)
    • Spotless enforcement action for code formatting (helpful for keeping code cleanly formatted after commits)
    • Gradle Validation action for validating the Gradle wrapper (helpful for ensuring supply chain security)
  • Preconfigured setup for Command-Based Robot projects (helpful for getting started)
  • Dependabot for dependency updates (helpful for keeping dependencies up to date)
  • Preconfigured setup for Spotless inside of Gradle (helpful for keeping code cleanly formatted during development)
    • Automatic formatting on every Gradle build is enabled by default
    • A syntax check if formatting was not applied locally will be performed on every push to main, including pull requests into main

Requirements

Caution

In the .github/workflows/syntax-check.yml workflow file, there is a secret that is used for automatically push changes from a GitHub Actions run, as by default the Actions runner itself does not have permission to push back to the repository. This is intended behavior for security reasons under the normal GITHUB_TOKEN permission set. To fix this, either:

If using a PAT in an organization, it is recommended to create a sock account that is generic but still has access to push to the repository, as this will be given least privilege to do other harm if that PAT were to be inadvertently public

Make sure you also grant the sock account proper access to the repository, that includes branch protections and write access to the repository

  • WPILib 2024.3.2
  • Internet connection (for Gradle to download dependencies)