Merge pull request #1465 from gradle/combined-prs-branch #196
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: Verify Convention Develocity Maven Extension | |
on: | |
push: | |
branches: [ main ] | |
paths: [ 'convention-develocity-maven-extension/**', '.github/workflows/**' ] | |
pull_request: | |
branches: [ main ] | |
paths: [ 'convention-develocity-maven-extension/**', '.github/workflows/**' ] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build Convention Develocity Maven Extension | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
cache: maven | |
- name: Set up Maven | |
uses: gradle/develocity-actions/[email protected] | |
- name: Configure Develocity Solutions instance | |
working-directory: convention-develocity-maven-extension/extension/src/main/java/com/myorg | |
run: sed -i 's/develocity-samples.gradle.com/ge.solutions-team.gradle.com/g' ConventionDevelocityListener.java | |
- name: Build with Maven | |
working-directory: convention-develocity-maven-extension/extension | |
run: ./mvnw clean install | |
- name: Upload extension | |
uses: actions/upload-artifact@v4 | |
with: | |
name: convention-develocity-maven-extension | |
path: ~/.m2/repository/com/myorg | |
verification: | |
name: Verify Example Build for Maven ${{ matrix.versions.version }} | |
needs: [build] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
versions: | |
- sample: '3' | |
version: '3.6.3' | |
- sample: '3' | |
version: '3.8.8' | |
- sample: '3' | |
version: '(Current)' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
cache: maven | |
- name: Set up Maven | |
uses: gradle/develocity-actions/[email protected] | |
- name: Download extension | |
uses: actions/download-artifact@v4 | |
with: | |
name: convention-develocity-maven-extension | |
path: ~/.m2/repository/com/myorg | |
- name: Set Maven version | |
if: ${{ matrix.versions.version != '(Current)' }} | |
working-directory: convention-develocity-maven-extension/examples/maven_${{ matrix.versions.sample }} | |
run: ./mvnw wrapper:wrapper -Dmaven=${{ matrix.versions.version }} -Ddevelocity.scan.disabled | |
- name: Verify example build | |
id: build | |
working-directory: convention-develocity-maven-extension/examples/maven_${{ matrix.versions.sample }} | |
run: ./mvnw clean verify | |
env: | |
DEVELOCITY_ACCESS_KEY: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }} | |
- name: Verify Build Scan published | |
if: ${{ !steps.build.outputs.build-scan-url }} | |
run: echo "::error ::No Build Scan published"; exit 1 |