Update dependencies for Micrometer and Reactor #772
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI PRs | |
on: | |
pull_request: | |
branches: | |
- 'main' | |
- '0.2.x' | |
paths-ignore: | |
- '.github/**' | |
jobs: | |
prerequisites: | |
name: Pre-requisites for building | |
runs-on: ubuntu-latest | |
if: github.repository == 'spring-projects/spring-pulsar' | |
outputs: | |
runjobs: ${{ steps.continue.outputs.runjobs }} | |
project_version: ${{ steps.continue.outputs.project_version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- id: continue | |
name: Determine if should continue | |
run: | | |
# Run jobs if in upstream repository | |
echo "runjobs=true" >>$GITHUB_OUTPUT | |
# Extract version from gradle.properties | |
version=$(cat gradle.properties | grep "version=" | awk -F'=' '{print $2}') | |
echo "project_version=$version" >>$GITHUB_OUTPUT | |
build_and_verify: | |
name: Build and Verify | |
needs: [prerequisites] | |
runs-on: ubuntu-latest | |
if: needs.prerequisites.outputs.runjobs | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: spring-io/spring-gradle-build-action@v2 | |
- 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: Capture Test Results | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-results | |
path: '*/build/reports/tests/**/*.*' | |
retention-days: 3 | |
integration_tests: | |
needs: [prerequisites, build_and_verify] | |
runs-on: ubuntu-latest | |
if: needs.prerequisites.outputs.runjobs | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: spring-io/spring-gradle-build-action@v2 | |
- 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 | |
check_samples: | |
needs: [prerequisites, build_and_verify] | |
runs-on: ubuntu-latest | |
if: needs.prerequisites.outputs.runjobs | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: spring-io/spring-gradle-build-action@v2 | |
- name: Run all sample app tests | |
env: | |
LOCAL_REPOSITORY_PATH: ${{ github.workspace }}/build/publications/repos | |
VERSION: ${{ needs.prerequisites.outputs.project_version }} | |
run: | | |
./gradlew publishMavenJavaPublicationToLocalRepository | |
./gradlew \ | |
--init-script ./spring-pulsar-sample-apps/sample-apps-check-ci.gradle \ | |
-PlocalRepositoryPath="$LOCAL_REPOSITORY_PATH" \ | |
-PspringPulsarVersion="$VERSION" \ | |
:runAllSampleTests | |
scan: | |
needs: [prerequisites] | |
if: needs.prerequisites.outputs.runjobs | |
uses: ./.github/workflows/trivy-scan.yml | |
done: | |
runs-on: ubuntu-latest | |
needs: [ build_and_verify, check_samples, scan ] | |
steps: | |
- name: 'Done' | |
shell: bash | |
run: echo "::info ::Done" |