Skip to content

[WIP] feat: naive performance test and handling results storing #6045

[WIP] feat: naive performance test and handling results storing

[WIP] feat: naive performance test and handling results storing #6045

Workflow file for this run

name: Verify Pull Request
env:
MAVEN_ARGS: -V -ntp -e
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'adr/**'
workflow_dispatch:
jobs:
check_format_and_unit_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Java and Maven
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 25
cache: 'maven'
- name: Check code format
run: |
./mvnw ${MAVEN_ARGS} spotless:check --file pom.xml
./mvnw -N license:check --file pom.xml
- name: Run unit tests
run: ./mvnw ${MAVEN_ARGS} clean install -Pno-apt --file pom.xml
build:
uses: ./.github/workflows/build.yml
performance_report:
name: Post Performance Results
runs-on: ubuntu-latest
needs: build
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v6
- name: Download all performance artifacts
uses: actions/download-artifact@v7
with:
pattern: performance-results-run-${{ github.run_id }}*
path: performance-results
merge-multiple: false
- name: Check for performance results
id: check_results
run: |
if [ -d "performance-results" ] && [ "$(ls -A performance-results/**/*.json 2>/dev/null)" ]; then
echo "Has results"
echo "has_results=true" >> $GITHUB_OUTPUT
else
echo "Has NO results"
echo "has_results=false" >> $GITHUB_OUTPUT
fi
- name: Convert performance results to markdown
if: steps.check_results.outputs.has_results == 'true'
id: convert
run: |
python3 .github/scripts/performance-to-markdown.py performance-results/**/*.json > comment.md
- name: Post PR comment
if: steps.check_results.outputs.has_results == 'true' && github.event_name == 'pull_request'
uses: marocchino/sticky-pull-request-comment@v2
with:
path: comment.md
recreate: true