Skip to content

Commit b78e7cb

Browse files
committed
[CI] Add check-samples.yml to main CI
Signed-off-by: onobc <chris.bono@gmail.com>
1 parent f2457cd commit b78e7cb

File tree

2 files changed

+16
-29
lines changed

2 files changed

+16
-29
lines changed

.github/workflows/check-samples.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
name: Check Samples
22

33
on:
4+
45
workflow_dispatch:
56

7+
workflow_call:
8+
secrets:
9+
SLACK_WEBHOOK_URL:
10+
required: true
11+
DEVELOCITY_ACCESS_KEY:
12+
required: true
13+
ARTIFACTORY_USERNAME:
14+
required: true
15+
ARTIFACTORY_PASSWORD:
16+
required: true
617
env:
718
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
8-
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
19+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
920
COMMIT_OWNER: ${{ github.event.pusher.name }}
1021
COMMIT_SHA: ${{ github.sha }}
1122
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}

.github/workflows/ci.yml

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -84,39 +84,15 @@ jobs:
8484
path: '*/build/reports/tests/**/*.*'
8585
retention-days: 3
8686
check_samples:
87-
name: Check Sample Apps
8887
needs: [prerequisites]
89-
strategy:
90-
matrix:
91-
springBootVersion: [ "${{ needs.prerequisites.outputs.boot_version }}" ]
92-
runs-on: ubuntu-latest
93-
if: needs.prerequisites.outputs.runjobs
94-
steps:
95-
- uses: actions/checkout@v5
96-
- uses: spring-io/spring-gradle-build-action@v2
97-
with:
98-
java-version: '25'
99-
distribution: 'liberica'
100-
- name: Run all sample app tests
101-
env:
102-
LOCAL_REPOSITORY_PATH: ${{ github.workspace }}/build/publications/repos
103-
VERSION: ${{ needs.prerequisites.outputs.project_version }}
104-
BOOT_VERSION: ${{ matrix.springBootVersion }}
105-
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
106-
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
107-
run: |
108-
./gradlew publishMavenJavaPublicationToLocalRepository
109-
./gradlew \
110-
--init-script ./spring-pulsar-sample-apps/sample-apps-check-ci.gradle \
111-
-PlocalRepositoryPath="$LOCAL_REPOSITORY_PATH" \
112-
-PspringPulsarVersion="$VERSION" \
113-
-PspringBootVersion="$BOOT_VERSION" \
114-
-PsampleTests \
115-
:runAllSampleTests
88+
uses: ./.github/workflows/check-samples.yml
89+
secrets: inherit
90+
11691
scan:
11792
needs: [prerequisites]
11893
if: ${{ needs.prerequisites.outputs.runjobs && !contains(inputs.run-trivy-scan, 'false') }}
11994
uses: ./.github/workflows/trivy-scan.yml
95+
12096
deploy_artifacts:
12197
name: Deploy Artifacts
12298
needs: [prerequisites, build_jdk_25, check_samples, scan]

0 commit comments

Comments
 (0)