Azure WindUp Rulesets PR builder #184
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
# PR-build-CI.yaml | |
# This yaml script will trigger when a PR is created on to the main branch - will ensure that the repo is built successfully with all the dependencies. | |
## Platform - Ubuntu | |
name: Azure WindUp Rulesets PR builder | |
env: | |
JAVA_DISTRIBUTION: 'microsoft' | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
- dev | |
- 'release-*/**' | |
jobs: | |
windup-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
repository: windup/windup | |
ref: master | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: ${{env.JAVA_DISTRIBUTION}} | |
java-package: jdk | |
- name: Cache local Maven repository | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-azure-windup-build-${{ github.sha }} | |
restore-keys: | |
${{ runner.os }}-maven-azure-windup-build | |
- name: Build on JDK 11 | |
run: ./mvnw -B clean install -DskipTests | |
windup-rules-test: | |
runs-on: ubuntu-latest | |
needs: [windup-build] | |
strategy: | |
fail-fast: false | |
matrix: | |
tests-pattern: ['rules-reviewed/[a-d]', 'rules-reviewed/eap6', 'rules-reviewed/eap7', 'rules-reviewed/eap8', 'rules-reviewed/eapxp', 'rules-reviewed/\(\(e[^a]\)\|[f-s]\)', 'rules-reviewed/technology-usage/tests/[0-9,a-i]', 'rules-reviewed/technology-usage/tests/[j-z]', 'rules-reviewed/[u-z]', 'rules-generated/', 'rules-overridden-azure/'] | |
java-version: [ 11, 17 ] | |
steps: | |
- name: Checkout windup-rulesets | |
uses: actions/checkout@v3 | |
- name: Set up MS Build of OpenJDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java-version }} | |
distribution: ${{ env.JAVA_DISTRIBUTION }} | |
- name: Cache local Maven repository | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-azure-windup-rulesets-build-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-maven-azure-windup-build-${{ github.sha }} | |
- name: Build | |
run: ./mvnw -B clean install -DskipTests | |
- name: Test | |
run: ./mvnw -B test -f rules/ -DrunTestsMatching=${{ matrix.tests-pattern }} -Dtest=WindupRulesTest | |
windup-rules-links-test: | |
runs-on: ubuntu-latest | |
needs: [windup-build] | |
strategy: | |
fail-fast: false | |
matrix: | |
java-version: [ 11, 17 ] | |
steps: | |
- name: Checkout appcat-rulesets | |
uses: actions/checkout@v3 | |
- name: Set up MS Build of OpenJDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java-version }} | |
distribution: ${{ env.JAVA_DISTRIBUTION }} | |
- name: Cache local Maven repository | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-azure-windup-rulesets-build-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-maven-azure-windup-build-${{ github.sha }} | |
- name: Build | |
run: ./mvnw -B clean install -DskipTests | |
- name: Test | |
run: ./mvnw -B test -f rules/ -Dtest=WindupRulesLinksTest |