Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: setup
description: "Setup Java"
inputs:
java-version:
description: "Java version to setup"
default: 17
cache:
description: "Cache Maven repo"
default: true

runs:
using: composite
steps:
- name: Fetch base ref to find merge-base for GIB
shell: bash
run: .github/bin/git-fetch-base-ref.sh
- uses: actions/setup-java@v3
if: ${{ inputs.java-version != '' }}
with:
distribution: 'zulu'
java-version: ${{ inputs.java-version }}
- name: Cache local Maven repo
id: cache
if: ${{ inputs.cache }}
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Configure Problem Matchers
if: ${{ inputs.java-version != '' }}
shell: bash
run: echo "::add-matcher::.github/problem-matcher.json"
31 changes: 31 additions & 0 deletions .github/actions/upload/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: upload
description: "Upload test results"
inputs:
name-suffix:
default: ${{ github.job }}
test-report-retention-days:
default: 5

runs:
using: composite
steps:
- name: Upload test results
uses: actions/upload-artifact@v3
# Upload all test reports only on failure, because the artifacts are large
if: failure()
with:
name: result ${{ inputs.name-suffix }}
path: |
**/target/surefire-reports
**/target/checkstyle-*
- name: Upload test report
uses: actions/upload-artifact@v3
# Always upload the test report for the annotate.yml workflow,
# but only the single XML file to keep the artifact small
if: always()
with:
# Name prefix is checked in the `Annotate checks` workflow
name: test report ${{ inputs.name-suffix }}
path: |
**/surefire-reports/TEST-*.xml
retention-days: ${{ inputs.test-report-retention-days }}
Loading