Skip to content

Bump org.codehaus.mojo:versions-maven-plugin from 2.12.0 to 2.16.2 #389

Bump org.codehaus.mojo:versions-maven-plugin from 2.12.0 to 2.16.2

Bump org.codehaus.mojo:versions-maven-plugin from 2.12.0 to 2.16.2 #389

name: Build and Test
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
java_version: 8
java_distribution: 'temurin'
jobs:
build_artifact:
name: Build Artifact
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Java ${{ env.java_version }}
uses: actions/setup-java@v3
with:
java-version: ${{ env.java_version }}
distribution: ${{ env.java_distribution }}
cache: 'maven'
- name: Build with Maven
run: mvn -B package --file pom.xml "-DskipTests=true" "-Dmaven.javadoc.skip=true" "-Dcheckstyle.skipExec=true"
- name: Upload Artifacts
if: github.event_name == 'push'
uses: actions/upload-artifact@v3
with:
name: MiSim Jars
path: ./target/*.jar
run_tests:
if: "!contains(github.event.head_commit.message, '[maven-release-plugin]')"
name: Run Tests & Report
runs-on: ubuntu-latest
needs: build_artifact
steps:
- uses: actions/checkout@v3
- name: Set up Java ${{ env.java_version }}
uses: actions/setup-java@v3
with:
java-version: ${{ env.java_version }}
distribution: ${{ env.java_distribution }}
cache: 'maven'
- name: Run JUnit Tests
run: mvn -B test --file pom.xml "-Dcheckstyle.skipExec=true"
- name: Upload Failed Test Results
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: Failed Test Results
path: |
./target/surefire-reports
./failed_test_results
- name: Publish Test Report
uses: dorny/test-reporter@v1
if: (success() || failure()) && (github.event.pull_request == '' || github.event.pull_request.head.repo.fork == false)
with:
name: Test Results (Dorny)
reporter: 'java-junit'
path: 'target/surefire-reports/*.xml'
run_hello_world_Linux:
if: "!contains(github.event.head_commit.message, '[maven-release-plugin]')"
name: Run Hello World (Linux)
runs-on: ubuntu-latest
needs: run_tests
steps:
- uses: actions/checkout@v3
- name: Set up Java ${{ env.java_version }}
uses: actions/setup-java@v3
with:
java-version: ${{ env.java_version }}
distribution: ${{ env.java_distribution }}
cache: 'maven'
- name: Run Hello World
run: ./hello_world.sh
run_hello_world_Windows:
if: "!contains(github.event.head_commit.message, '[maven-release-plugin]')"
name: Run Hello World (Windows)
runs-on: windows-latest
needs: run_tests
steps:
- uses: actions/checkout@v3
- name: Set up Java ${{ env.java_version }}
uses: actions/setup-java@v3
with:
java-version: ${{ env.java_version }}
distribution: ${{ env.java_distribution }}
cache: 'maven'
- name: Run Hello World
run: ./hello_world.bat