-
Notifications
You must be signed in to change notification settings - Fork 12
45 lines (42 loc) · 1.44 KB
/
mavenMain.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Build main Branch
on:
push:
branches: [ main ]
workflow_dispatch:
schedule:
- cron: "0 3 * * *"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 11, 17 ]
fail-fast: false
name: Java ${{ matrix.java }} sample
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ matrix.java }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ matrix.java }}-m2
- name: Build Peass (Current dependent project version)
run: |
branch=main
cd /home/runner/work/ && git clone -b $branch https://github.com/DaGeRe/peass.git && cd peass && echo "Branch: $branch" && git rev-parse HEAD && ./mvnw clean install -DskipTests
- name: Build with Maven
run: |
cd /home/runner/work/peass-ci-plugin/peass-ci-plugin/ && ./mvnw -B package --file pom.xml
- name: Publish Test Report
if: ${{ always() }}
uses: scacap/action-surefire-report@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}