Skip to content

Commit 960c133

Browse files
Create java-ci.yml
1 parent 953110c commit 960c133

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/java-ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Java CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Java 17
16+
uses: actions/setup-java@v4
17+
with:
18+
distribution: temurin
19+
java-version: 17
20+
21+
- name: Compile all Java files
22+
run: |
23+
echo "Compiling Java source..."
24+
find . -name "*.java" > sources.txt
25+
if [ -s sources.txt ]; then
26+
javac @sources.txt
27+
echo "Compilation successful."
28+
else
29+
echo "No Java files found."
30+
fi

0 commit comments

Comments
 (0)