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
Action | Status |
---|---|
CI | |
Qodana | |
CodeQL | |
Spotless |
- Create a template of this repository
- Follow GitHub prompts for creating a repository
- Clone newly created repository
- Open the project in your WPILib Visual Studio Code (VS Code) after cloning
- 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
- 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 intomain
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:
- Create a new personal access token to scope the repository itself
- Create a new personal access token to scope the organization to be used elsewhere (helpful if using this template on multiple different projects)
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)