-
Notifications
You must be signed in to change notification settings - Fork 21
57 lines (45 loc) · 1.82 KB
/
pullrequest.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
46
47
48
49
50
51
52
53
54
55
56
57
# Sanity check for pull requests - just checks that it compiles.
# Will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
name: Pullrequest - Sanitycheck
run-name: Pullrequest - Sanitycheck ${{ github.head_ref }} for ${{ github.ref_name }}
on:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
MVNCMD: mvn -B -ntp -s ${{ github.workspace }}/.github/settings-public.xml -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
maven-version: 3.8.7
- name: Dump event context for debugging
continue-on-error: true # Debugging output only, and this annoyingly fails when the commit messge has a (
run: |
echo '${{ github.event_name }} for ${{ github.ref_type }} ${{ github.ref_name }} or ${{ github.event.ref }}'
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push
echo 'github.event:'
echo '${{ toJSON(github.event) }}'
- name: Dump github context
continue-on-error: true # Debugging output only, and this annoyingly fails when the commit message has a (
run: |
echo '${{ toJSON(github) }}'
- name: Git & Maven Status
run: |
git status --untracked-files --ignored
git log -3 --no-color
$MVNCMD -version
- name: Mvn Effective POM
run: $MVNCMD -N help:effective-pom
- name: Mvn Effective Settings
run: $MVNCMD -N help:effective-settings
- name: Testbuild with Maven
run: $MVNCMD -P test verify