From 6fdc53910b769db65ea4a59f2a4de0a4f3613a57 Mon Sep 17 00:00:00 2001 From: Nerosshini Date: Sat, 7 Sep 2024 00:45:19 +0800 Subject: [PATCH] Add CI workflow configuration --- .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..579eb0de6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: Java CI with Gradle + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + + - name: Build with Gradle + run: ./gradlew build + + - name: Run tests + run: ./gradlew test + + - name: Upload test results + uses: actions/upload-artifact@v3 + with: + name: test-results + path: build/test-results/test + + - name: Upload code coverage report + uses: actions/upload-artifact@v3 + with: + name: jacoco-report + path: build/reports/jacoco/test/html