Adding ci-pr.yml (#2808)
* Adding ci-pr.yml * Add missing settings.xml * [CI] Polish ci-pr.yml - Remove extra profiles from settings.xml - Simpify the workflow --------- Co-authored-by: Chris Bono <cbono@vmware.com>
This commit is contained in:
59
.github/workflows/ci-pr.yml
vendored
Normal file
59
.github/workflows/ci-pr.yml
vendored
Normal file
@@ -0,0 +1,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
|
||||
Reference in New Issue
Block a user