Merge pull request #40 from RadiationX/feature/type-cast-extensions #79
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Maven Build and Test | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Cache Maven packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Install dependencies | |
run: mvn clean install | |
continue-on-error: true | |
- name: Run tests with coverage | |
run: mvn test jacoco:report | |
continue-on-error: true | |
- name: Archive test reports | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: surefire-reports | |
path: target/surefire-reports/*.xml | |
- name: Archive coverage report | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: jacoco-report | |
path: target/site/jacoco/jacoco.xml | |
- name: Report test results | |
if: always() | |
uses: dorny/test-reporter@v1 | |
with: | |
name: Test Results | |
path: target/surefire-reports/*.xml | |
reporter: java-junit | |
fail-on-error: false |