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:
62
.github/settings.xml
vendored
Normal file
62
.github/settings.xml
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
<settings>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>pr</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>maven-central</id>
|
||||
<name>Maven Central</name>
|
||||
<url>https://repo.maven.apache.org/maven2</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-snapshots</id>
|
||||
<name>Spring Snapshots</name>
|
||||
<url>https://repo.spring.io/snapshot</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>https://repo.spring.io/milestone</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>maven-central</id>
|
||||
<name>Maven Central</name>
|
||||
<url>https://repo.maven.apache.org/maven2</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>spring-snapshots</id>
|
||||
<name>Spring Snapshots</name>
|
||||
<url>https://repo.spring.io/snapshot</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>https://repo.spring.io/milestone</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</profile>
|
||||
</profiles>
|
||||
</settings>
|
||||
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