Merge pull request #103 from Summer2023SHY/dependabot/maven/org.apach… #229
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: CI | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
paths-ignore: | |
- "README.md" | |
- "Docs/*" | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
pull_request: | |
branches: | |
- main | |
- dev | |
permissions: | |
actions: read | |
contents: write | |
issues: read | |
checks: write | |
pull-requests: write | |
jobs: | |
build: | |
name: Build JAR File | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Setup JDK | |
uses: actions/[email protected] | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
- name: Build JAR | |
run: | | |
mvn clean compile assembly:single | |
- name: Submit Dependency Snapshot | |
uses: advanced-security/maven-dependency-submission-action@v3 | |
- name: Upload JAR file | |
# if: false | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: actions/[email protected] | |
with: | |
name: JDec-JAR | |
path: target/*.jar | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- name: Windows | |
tag: windows-latest | |
- name: Ubuntu | |
tag: ubuntu-latest | |
name: Unit Tests (${{ matrix.os.name }}) | |
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
runs-on: ${{ matrix.os.tag }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin # Eclipse Temurin | |
java-version: '17' # Java 17 (LTS) | |
cache: 'maven' | |
- name: Run Tests | |
run: | | |
mvn test | |
- name: Publish Test Results | |
if: ${{ always() }} | |
uses: mikepenz/action-junit-report@v3 | |
with: | |
report_paths: "**/TEST-*.xml" | |
exclude_sources: target/ | |
check_name: Test Results - ${{ matrix.os.name }} | |