Skip to content

Create java-ci.yml

Create java-ci.yml #2

Workflow file for this run

name: Java CI with Maven (GitHub Checks)
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build project
run: mvn -B clean compile
- name: Run tests with annotations
uses: dorny/test-reporter@v1
with:
name: Maven Tests
path: target/surefire-reports/*.xml
reporter: junit
fail-on-error: true