|
| 1 | +name: Check Samples (Maven) |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + |
| 6 | +jobs: |
| 7 | + check_samples: |
| 8 | + name: Check Samples project |
| 9 | + if: ${{ github.repository == 'spring-projects/spring-grpc' }} |
| 10 | + strategy: |
| 11 | + matrix: |
| 12 | + include: |
| 13 | + - javaVersion: 25 |
| 14 | + distribution: 'liberica' |
| 15 | + - javaVersion: 17 |
| 16 | + distribution: 'temurin' |
| 17 | + runs-on: ubuntu-latest |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v4 |
| 20 | + - name: Set up Java ${{ matrix.javaVersion }} ${{ matrix.distribution }} |
| 21 | + uses: actions/setup-java@v4 |
| 22 | + with: |
| 23 | + java-version: ${{ matrix.javaVersion }} |
| 24 | + distribution: ${{ matrix.distribution }} |
| 25 | + cache: maven |
| 26 | + |
| 27 | + - name: Build and run samples w/ Java 25 ${{ matrix.distribution }} |
| 28 | + if: ${{ matrix.javaVersion == 25 }} |
| 29 | + run: | |
| 30 | + cd samples |
| 31 | + ../mvnw clean install \ |
| 32 | + -pl '!grpc-server-kotlin' \ |
| 33 | + -Dmaven-checkstyle-plugin.config.location=../src/checkstyle \ |
| 34 | + -Djava.version=25 |
| 35 | + ../mvnw clean install \ |
| 36 | + -pl 'grpc-server-kotlin' \ |
| 37 | + -Dmaven-checkstyle-plugin.config.location=../src/checkstyle \ |
| 38 | + -Djava.version=24 |
| 39 | +
|
| 40 | + - name: Build and run samples w/ Java ${{ matrix.javaVersion }} ${{ matrix.distribution }} |
| 41 | + if: ${{ matrix.javaVersion != 25 }} |
| 42 | + run: | |
| 43 | + cd samples |
| 44 | + ../mvnw clean install \ |
| 45 | + -Dmaven-checkstyle-plugin.config.location=../src/checkstyle \ |
| 46 | + -Djava.version=${{ matrix.javaVersion }} |
| 47 | +
|
| 48 | + - name: Upload Build Reports (Java ${{ matrix.javaVersion }} ${{ matrix.distribution }}) |
| 49 | + if: failure() |
| 50 | + uses: actions/upload-artifact@v4 |
| 51 | + with: |
| 52 | + name: test-results |
| 53 | + path: '*/target/surefire-reports/*.*' |
| 54 | + retention-days: 3 |
0 commit comments