From 068d8cc7d39ee7ab52b22b69d0535150d7542f42 Mon Sep 17 00:00:00 2001 From: iefomit <108955303+iefomit@users.noreply.github.com> Date: Sun, 23 Aug 2026 22:49:11 -0700 Subject: [PATCH] add workflows + codeowners + pr template --- CODEOWNERS | 2 ++ PULL_REQUEST_TEMPLATE.md | 15 ++++++++++++++ workflows/autofmt.yml | 23 ++++++++++++++++++++++ workflows/main.yml | 42 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 82 insertions(+) create mode 100644 CODEOWNERS create mode 100644 PULL_REQUEST_TEMPLATE.md create mode 100644 workflows/autofmt.yml create mode 100644 workflows/main.yml diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..ff01304 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,2 @@ +# Make the pull reviewers code owners for every file, they will get requested for review when a PR is made +* @moogoesmeow0 @iefomit \ No newline at end of file diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..959edae --- /dev/null +++ b/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,15 @@ +## Overview + +This PR will... + + +## Documentation + + + +## Tests Ran + + + +## Additional Notes + \ No newline at end of file diff --git a/workflows/autofmt.yml b/workflows/autofmt.yml new file mode 100644 index 0000000..449022c --- /dev/null +++ b/workflows/autofmt.yml @@ -0,0 +1,23 @@ +name: Format + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + + formatting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 # v2 minimum required + + - name: Set up java + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '21' + - uses: axel-op/googlejavaformat-action@v4 + with: + args: "--skip-sorting-imports --replace" diff --git a/workflows/main.yml b/workflows/main.yml new file mode 100644 index 0000000..faa5948 --- /dev/null +++ b/workflows/main.yml @@ -0,0 +1,42 @@ +# This is a basic workflow to build robot code. credit: WPI + +name: CI + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the main branch. +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # This grabs the WPILib docker container + container: wpilib/roborio-cross-ubuntu:2023-22.04 + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + + # Declares the repository safe and not under dubious ownership. + - name: Add repository to git safe directories + run: git config --global --add safe.directory $GITHUB_WORKSPACE + + # Grant execute permission for gradlew + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + # Call gversion to make the version file + - name: Create BuildData.java + run: ./gradlew createVersionFile + + # Runs a single command using the runners shell + - name: Compile and run tests on robot code + run: ./gradlew build -- 2.47.3