Skip to content

infra: harden GitHub workflows #202

infra: harden GitHub workflows

infra: harden GitHub workflows #202

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
install:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
jdk: [11, 17]
runs-on: ${{ matrix.platform }}
permissions:
checks: write
pull-requests: write
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
fetch-depth: 50
- name: Setup local maven cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ~/.m2/repository
key: maven-cache-${{ hashFiles('**/pom.xml') }}
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
with:
distribution: temurin
java-version: ${{ matrix.jdk }}
- name: Build with Maven
run: ./mvnw --errors --no-transfer-progress install
- name: Difference Check
run: ./.ci/validation.sh git-diff
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@ca89ad036b5fcd524c1017287fb01b5139908408 # v2.11.0
# we only want to attach test results one time, not for every matrix combination
if: startsWith(matrix.platform, 'ubuntu') && (matrix.jdk == 17)
with:
files: '**/target/surefire-reports/*.xml'