-
Notifications
You must be signed in to change notification settings - Fork 36
52 lines (44 loc) · 1.6 KB
/
maven.yml
File metadata and controls
52 lines (44 loc) · 1.6 KB
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
# This workflow will build a Java / Kotlin project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Build
on:
push:
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Configure Testcontainers
run: |
mkdir -p /home/runner
echo "testcontainers.reuse.enable=true" > /home/runner/.testcontainers.properties
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -U -B test verify
notify:
needs: [build]
if: failure() && github.ref == 'refs/heads/main'
uses: embabel/embabel-build/.github/workflows/discord-notify.yml@main
secrets: inherit
notify-recovery:
needs: [build]
if: success() && github.ref == 'refs/heads/main'
uses: embabel/embabel-build/.github/workflows/notify-recovery.yml@main
with:
branch: main
caller_run_id: ${{ github.run_id }}
secrets: inherit