Merge pull request #7 from saurabh-oss/jenkins-hosting-compliance #19
This file contains hidden or 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 — Build & Test | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| java: ['17', '21'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Build & Test | |
| run: mvn clean verify -B -Dmaven.test.failure.ignore=false | |
| - name: Upload HPI artifact | |
| if: matrix.java == '17' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: forgeai-plugin-hpi | |
| path: target/*.hpi | |
| retention-days: 14 | |
| - name: Upload test reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-reports-java-${{ matrix.java }} | |
| path: target/surefire-reports/ | |
| retention-days: 7 | |
| compatibility: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| strategy: | |
| matrix: | |
| jenkins-version: ['2.426.3', '2.440.1', '2.462.1'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Test with Jenkins ${{ matrix.jenkins-version }} | |
| run: mvn clean verify -B -Djenkins.version=${{ matrix.jenkins-version }} |