Skip to content

Migrate CI/CD to github workflows/actions. #1

Migrate CI/CD to github workflows/actions.

Migrate CI/CD to github workflows/actions. #1

Workflow file for this run

name: Maven build
on:
push:
branches: [ "master", "1.0.x" , "1.1.x" , "1.2.x" , "1.3.x" ]
pull_request:
branches: [ "master", "1.0.x" , "1.1.x" , "1.2.x" , "1.3.x" ]
jobs:
build:
permissions:
checks: write
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: >-
mvn -B -fae -nsu clean verify
- name: Upload Test Report
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: "java-test-report"
path: |
**/surefire-reports/TEST-*.xml
**/failsafe-reports/TEST-*.xml