diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..11abdb1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: Java CI with Maven + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + name: Build & Test + runs-on: ubuntu-latest + + strategy: + matrix: + java-version: [ '11' ] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up JDK ${{ matrix.java-version }} + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.java-version }} + distribution: 'temurin' + cache: 'maven' + + - name: Build with Maven + run: mvn -B compile --no-transfer-progress + + - name: Run tests + run: mvn -B test --no-transfer-progress + continue-on-error: true + + - name: Package + run: mvn -B package -DskipTests --no-transfer-progress + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-results-java-${{ matrix.java-version }} + path: target/surefire-reports/ + retention-days: 7