-
Notifications
You must be signed in to change notification settings - Fork 0
Adding github actions for PRs #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
05260d5
9331365
e2f7578
584ace6
9ae4188
f67d0b5
f04ddef
17858f2
bd4e37a
7020759
ee7c8c3
5dfd5ac
0b8e762
c2a30fc
384007e
1435c75
cb6abd3
5f6f65c
d456944
509367f
df87823
ba929f6
0ea5d02
859b7a4
c87b80e
c06baa8
c23dc67
ce287c7
97f38ab
336d6eb
0e27c50
cd8844e
bfc19e0
24e4b83
7549e78
a297961
425fa3c
72d7605
4b6f122
f81aba7
25f45a3
d01487c
8d47fc2
39705a3
761db14
c03e7ff
fb09961
3eb9319
fc1650e
97117a8
fa1bfc0
8b9002b
894414e
aadcbeb
29fc8e8
1191e31
b9fe615
e24c866
b50eb93
d05a251
153c320
c5e0d39
14746a6
41d0bbc
b04bc41
6e5a426
6957bf9
e890fd6
2525c60
6f693ec
009e9a7
41d9b7c
0eb5e06
2b7b878
3de3c1a
62d2ec3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,87 @@ | ||||||||||||||||||||||
| name: CI (Build + Lint + Tests) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| on: | ||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||
| paths: | ||||||||||||||||||||||
| - "TeamCode/**" | ||||||||||||||||||||||
| - "FtcRobotController/**" | ||||||||||||||||||||||
| - "libs/**" | ||||||||||||||||||||||
| - "gradle/**" | ||||||||||||||||||||||
| - "build.gradle" | ||||||||||||||||||||||
| - "build.common.gradle" | ||||||||||||||||||||||
| - "build.dependencies.gradle" | ||||||||||||||||||||||
| - "settings.gradle" | ||||||||||||||||||||||
| - "gradle.properties" | ||||||||||||||||||||||
| - "gradlew" | ||||||||||||||||||||||
| - "gradlew.bat" | ||||||||||||||||||||||
| - ".github/workflows/**" | ||||||||||||||||||||||
| push: | ||||||||||||||||||||||
| # Keep this narrow so you don't burn minutes on every branch. | ||||||||||||||||||||||
| # Add/remove branches to match how your team works. | ||||||||||||||||||||||
| branches: | ||||||||||||||||||||||
| - "Quali-1" | ||||||||||||||||||||||
| paths: | ||||||||||||||||||||||
| - "TeamCode/**" | ||||||||||||||||||||||
| - "FtcRobotController/**" | ||||||||||||||||||||||
| - "libs/**" | ||||||||||||||||||||||
| - "gradle/**" | ||||||||||||||||||||||
| - "build.gradle" | ||||||||||||||||||||||
| - "build.common.gradle" | ||||||||||||||||||||||
| - "build.dependencies.gradle" | ||||||||||||||||||||||
| - "settings.gradle" | ||||||||||||||||||||||
| - "gradle.properties" | ||||||||||||||||||||||
| - "gradlew" | ||||||||||||||||||||||
| - "gradlew.bat" | ||||||||||||||||||||||
| - ".github/workflows/**" | ||||||||||||||||||||||
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| concurrency: | ||||||||||||||||||||||
| group: ci-${{ github.workflow }}-${{ github.ref }} | ||||||||||||||||||||||
|
||||||||||||||||||||||
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| group: ${{ github.workflow }}-${{ github.ref }} |
Copilot
AI
Dec 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow sets up JDK 17, but TeamCode/build.gradle specifies Java 16 for sourceCompatibility/targetCompatibility and Java 21 for the toolchain. This version mismatch could lead to build inconsistencies between local development and CI. Consider aligning the JDK version in the workflow with the toolchain version (21) specified in the Gradle build, or ensuring the workflow uses a JDK version that matches your project's actual requirements.
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "21" |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,48 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Format (TeamCode Java) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| paths: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "TeamCode/**/*.java" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - ".github/workflows/**" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| branches: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "Quali-1" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| paths: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "TeamCode/**/*.java" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - ".github/workflows/**" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+7
to
+13
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - ".github/workflows/**" | |
| push: | |
| branches: | |
| - "Quali-1" | |
| paths: | |
| - "TeamCode/**/*.java" | |
| - ".github/workflows/**" | |
| - ".github/workflows/format-java.yml" | |
| push: | |
| branches: | |
| - "Quali-1" | |
| paths: | |
| - "TeamCode/**/*.java" | |
| - ".github/workflows/format-java.yml" |
Copilot
AI
Dec 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path filter '.github/workflows/**' will trigger this workflow when any workflow file changes, not just this specific workflow. This could cause unnecessary CI runs when unrelated workflows are modified. Consider using '.github/workflows/format-java.yml' to only trigger on changes to this specific workflow file, matching the pattern used in spotbugs-teamcode.yml.
| - ".github/workflows/**" | |
| push: | |
| branches: | |
| - "Quali-1" | |
| paths: | |
| - "TeamCode/**/*.java" | |
| - ".github/workflows/**" | |
| - ".github/workflows/format-java.yml" | |
| push: | |
| branches: | |
| - "Quali-1" | |
| paths: | |
| - "TeamCode/**/*.java" | |
| - ".github/workflows/format-java.yml" |
Copilot
AI
Dec 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The concurrency group name 'format-${{ github.workflow }}-${{ github.ref }}' includes redundant information since github.workflow already contains the workflow name. This pattern is inconsistent with the other workflows. Consider using just '${{ github.workflow }}-${{ github.ref }}' for consistency across all workflows, or ensure all workflows follow the same naming pattern.
| group: format-${{ github.workflow }}-${{ github.ref }} | |
| group: ${{ github.workflow }}-${{ github.ref }} |
Copilot
AI
Dec 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The step name 'Fail if formatting changed (prints diff)' doesn't provide a helpful error message when formatting issues are found. Consider adding an error message before the git diff command to explain what the developer needs to do, such as: 'echo "::error::Code formatting issues detected. Please run google-java-format locally and commit the changes." && git --no-pager diff && exit 1' when differences are found.
| run: git --no-pager diff --exit-code | |
| run: | | |
| if ! git --no-pager diff --quiet; then | |
| echo "::error::Code formatting issues detected. Please run google-java-format locally on 'TeamCode/**/*.java' and commit the changes." | |
| git --no-pager diff | |
| exit 1 | |
| fi |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,96 @@ | ||||||||||||||||||||||
| name: SpotBugs (TeamCode) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| on: | ||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||
| paths: | ||||||||||||||||||||||
| - "TeamCode/**" | ||||||||||||||||||||||
| - "build.gradle" | ||||||||||||||||||||||
| - "build.common.gradle" | ||||||||||||||||||||||
| - "build.dependencies.gradle" | ||||||||||||||||||||||
| - "settings.gradle" | ||||||||||||||||||||||
| - "gradle.properties" | ||||||||||||||||||||||
| - "gradle/**" | ||||||||||||||||||||||
| - "gradlew" | ||||||||||||||||||||||
| - "gradlew.bat" | ||||||||||||||||||||||
| - ".github/workflows/spotbugs-teamcode.yml" | ||||||||||||||||||||||
| push: | ||||||||||||||||||||||
| branches: ["Quali-1"] | ||||||||||||||||||||||
| paths: | ||||||||||||||||||||||
| - "TeamCode/**" | ||||||||||||||||||||||
| - "build.gradle" | ||||||||||||||||||||||
| - "build.common.gradle" | ||||||||||||||||||||||
| - "build.dependencies.gradle" | ||||||||||||||||||||||
| - "settings.gradle" | ||||||||||||||||||||||
| - "gradle.properties" | ||||||||||||||||||||||
| - "gradle/**" | ||||||||||||||||||||||
| - "gradlew" | ||||||||||||||||||||||
| - "gradlew.bat" | ||||||||||||||||||||||
| - ".github/workflows/spotbugs-teamcode.yml" | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| concurrency: | ||||||||||||||||||||||
| group: spotbugs-${{ github.workflow }}-${{ github.ref }} | ||||||||||||||||||||||
|
||||||||||||||||||||||
| group: spotbugs-${{ github.workflow }}-${{ github.ref }} | |
| group: ${{ github.workflow }}-${{ github.ref }} |
Copilot
AI
Dec 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow sets up JDK 17, but TeamCode/build.gradle specifies Java 16 for sourceCompatibility/targetCompatibility and Java 21 for the toolchain. This version mismatch could lead to build inconsistencies between local development and CI. Consider aligning the JDK version in the workflow with the toolchain version (21) specified in the Gradle build, or ensuring the workflow uses a JDK version that matches your project's actual requirements.
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "21" |
Copilot
AI
Dec 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SpotBugs workflow will fail because the SpotBugs Gradle plugin is not applied in the TeamCode module or any build.gradle files. Before this workflow can function, you need to add the SpotBugs plugin to your Gradle configuration. Consider adding the plugin to TeamCode/build.gradle or build.common.gradle with proper configuration.
| echo "::error::No SpotBugs task found for :TeamCode. Make sure the SpotBugs Gradle plugin is applied/configured for TeamCode." | |
| echo "Here are any spotbugs-related tasks Gradle sees:" | |
| ./gradlew -q :TeamCode:tasks --all | grep -i spotbugs || true | |
| exit 1 | |
| fi | |
| echo "::warning::No SpotBugs task found for :TeamCode. SpotBugs will be skipped. Make sure the SpotBugs Gradle plugin is applied/configured for TeamCode if you expect these checks to run." | |
| echo "Here are any spotbugs-related tasks Gradle sees:" | |
| ./gradlew -q :TeamCode:tasks --all | grep -i spotbugs || true | |
| fi |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path filter '.github/workflows/**' will trigger this workflow when any workflow file changes. This could cause unnecessary CI runs when unrelated workflows are modified. Consider being more specific about which workflow changes should trigger the full CI build, or remove this path if changes to workflows should always trigger CI validation.