-
Notifications
You must be signed in to change notification settings - Fork 22
54 lines (46 loc) · 1.7 KB
/
Copy pathmaven-build.yml
File metadata and controls
54 lines (46 loc) · 1.7 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
# 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: [ 'dev-1.x' ]
pull_request:
branches: [ 'dev-1.x' , 'release-1.x' ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 7
matrix:
java: [ '8', '11' ]
maven-profile-spring-boot: [ 'spring-boot-2.1' , 'spring-boot-2.2' , 'spring-boot-2.3',
'spring-boot-2.4' ,'spring-boot-2.5' , 'spring-boot-2.6' ,
'spring-boot-2.7' ]
steps:
- name: Checkout Source
uses: actions/checkout@v5
- name: Setup JDK ${{ matrix.Java }}
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Build with Maven
run: ./mvnw
--batch-mode
--update-snapshots
--file pom.xml
-Drevision=0.0.1-SNAPSHOT
-Dsurefire.useSystemClassLoader=false
test
--activate-profiles test,coverage,${{ matrix.maven-profile-spring-boot }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: microsphere-projects/microsphere-spring-boot