From e671a8674733b4e62556cc1ef7bbe1c6b57d3d4a Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 5 May 2024 16:33:50 +0800 Subject: [PATCH] Add source --- .gitea/workflows/test.yaml | 21 +++++++++++++++++++++ .gitignore | 1 + .vscode/settings.json | 3 +++ pom.xml | 17 +++++++++++++++++ src/main/java/com/example/Main.java | 7 +++++++ 5 files changed, 49 insertions(+) create mode 100644 .gitea/workflows/test.yaml create mode 100644 .vscode/settings.json create mode 100644 pom.xml create mode 100644 src/main/java/com/example/Main.java diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml new file mode 100644 index 0000000..86cf969 --- /dev/null +++ b/.gitea/workflows/test.yaml @@ -0,0 +1,21 @@ +name: Java CI with Maven + +on: + push: + branches: + - main + +jobs: + build_and_test: + name: Build and Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 11 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn test diff --git a/.gitignore b/.gitignore index 9154f4c..8b3972e 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ hs_err_pid* replay_pid* +target \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..c5f3f6b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.configuration.updateBuildConfiguration": "interactive" +} \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..f7c34cf --- /dev/null +++ b/pom.xml @@ -0,0 +1,17 @@ + + + 4.0.0 + + com.example + demo + 1.0-SNAPSHOT + pom + + + 17 + 17 + + + \ No newline at end of file diff --git a/src/main/java/com/example/Main.java b/src/main/java/com/example/Main.java new file mode 100644 index 0000000..b47156f --- /dev/null +++ b/src/main/java/com/example/Main.java @@ -0,0 +1,7 @@ +package com.example; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file