-
Notifications
You must be signed in to change notification settings - Fork 61
66 lines (56 loc) · 1.82 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
60
61
62
63
64
65
66
name: CI PRs
on:
pull_request:
branches:
- 'main'
- '0.2.x'
paths-ignore:
- '.github/**'
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
jobs:
build_and_verify:
name: Build and Verify
if: github.repository == 'spring-projects/spring-pulsar'
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up Java 17
uses: actions/setup-java@v2
with:
java-version: 17
distribution: temurin
- name: Setup Gradle user name
run: |
mkdir -p ~/.gradle
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
env:
GRADLE_USER_HOME: ~/.gradle
- name: Build and run unit tests
run: |
./gradlew clean build -x integrationTest --continue --scan
- name: Create Aggregated Jacoco Report
if: contains(github.event.pull_request.labels.*.name, 'ci/upload-jacoco')
run: |
./gradlew aggregateJacocoTestReport --info
- name: Upload Aggregated Jacoco Report
if: contains(github.event.pull_request.labels.*.name, 'ci/upload-jacoco')
uses: actions/upload-artifact@v3
with:
name: jacoco-results
path: 'build/reports/jacoco/**/*.*'
retention-days: 3
- name: Run integration tests
run: |
./gradlew integrationTest --rerun-tasks -DdownloadRabbitConnector=true --scan
- name: Capture Test Results
if: failure()
uses: actions/upload-artifact@v3
with:
name: test-results
path: '*/build/reports/tests/**/*.*'
retention-days: 3