-
Notifications
You must be signed in to change notification settings - Fork 30
58 lines (49 loc) · 1.81 KB
/
Copy pathmaven-build.yml
File metadata and controls
58 lines (49 loc) · 1.81 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
53
54
55
56
57
58
# This workflow will build a Java 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: Maven Build
permissions:
contents: read
on:
push:
branches: [ 'main' , 'dev' ]
pull_request:
branches: [ 'main' , 'dev' , 'release' ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17' , '21' , '25' ]
maven-profile-spring-cloud: [ 'spring-cloud-2022' , 'spring-cloud-2023' , 'spring-cloud-2024' ,
'spring-cloud-2025' ]
steps:
- name: Checkout Source
uses: actions/checkout@v5
- name: Setup Testcontainers Cloud Client
uses: atomicjar/testcontainers-cloud-setup-action@v1
with:
token: ${{ secrets.TC_CLOUD_TOKEN }}
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: maven
- name: Build with Maven
run: mvn
--batch-mode
--update-snapshots
--file pom.xml
-Drevision=0.0.1-SNAPSHOT
-Dsurefire.useSystemClassLoader=false
test
--activate-profiles test,coverage,testcontainers,${{ matrix.maven-profile-spring-cloud }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: microsphere-projects/microsphere-spring-cloud