Skip to content

foresight-maven-build-lab #353

foresight-maven-build-lab

foresight-maven-build-lab #353

name: foresight-maven-build-lab
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: "0 9 * * *"
workflow_dispatch:
env:
FORESIGHT_UPLOADER_SIGNER_URL: https://upload.service.runforesight.me
WORKFLOW_TELEMETRY_BASE_URL: https://api.service.runforesight.me
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Collect Workflow Telemetry
uses: runforesight/foresight-workflow-kit-action@v1
with:
api_key: ${{ secrets.FORESIGHT_API_KEY }}
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn clean install
- name: Analyze Test and/or Coverage Results
if: always()
uses: runforesight/foresight-test-kit-action@v1
with:
api_key: ${{ secrets.FORESIGHT_API_KEY }}
test_framework: junit
test_path: "./target/surefire-reports/**"
coverage_format: jacoco/xml
coverage_path: "./target/site/jacoco/*.xml"