-
Notifications
You must be signed in to change notification settings - Fork 614
59 lines (49 loc) · 1.36 KB
/
ci-pr.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
58
59
name: CI PRs
on:
pull_request:
branches:
- 'main'
- '4.0.x'
- '3.2.x'
paths-ignore:
- '.github/**'
env:
MAVEN_THREADS: '-T 2'
jobs:
build_and_verify:
name: Build and Verify
if: github.repository == 'spring-cloud/spring-cloud-stream'
runs-on: ubuntu-latest
steps:
- name: Checkout SCSt repo
uses: actions/checkout@v2
- name: Setup Maven cache
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-
- name: Setup Java 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'liberica'
- name: Setup Maven
uses: jvalkeal/setup-maven@v1
with:
maven-version: 3.8.8
maven-mirror: 'https://dlcdn.apache.org/maven/maven-3/'
- name: Build and run unit tests
run: |
mvn -B -s .github/settings.xml clean install
- name: Clean Maven cache
run: |
find ~/.m2/repository -type d -name '*SNAPSHOT' | xargs rm -fr
- name: Capture Test Results
if: failure()
uses: actions/upload-artifact@v3
with:
name: test-results
path: '*/target/surefire-reports/*.*'
retention-days: 3