|
| 1 | +name: Benchmark Tests |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + schedule: |
| 6 | + - cron: "0 0 * * SUN" # Runs daily at midnight |
| 7 | + |
| 8 | +jobs: |
| 9 | + setup: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + permissions: |
| 12 | + contents: write |
| 13 | + packages: write |
| 14 | + attestations: write |
| 15 | + id-token: write |
| 16 | + |
| 17 | + steps: |
| 18 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 19 | + - name: Ensure SHA pinned actions |
| 20 | + uses: zgosalvez/github-actions-ensure-sha-pinned-actions@471d5ace1f08e3c4df1c4c2f7e6341aa75da434a # v5.0.3 |
| 21 | + - name: Run pre-commit |
| 22 | + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 |
| 23 | + with: |
| 24 | + python-version: "3.13.0" |
| 25 | + cache: "pip" |
| 26 | + - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 |
| 27 | + |
| 28 | + - name: Set up JDK 21 |
| 29 | + uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 |
| 30 | + with: |
| 31 | + distribution: "temurin" |
| 32 | + java-version: 21 |
| 33 | + |
| 34 | + - name: Cache local Maven repository |
| 35 | + uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 |
| 36 | + with: |
| 37 | + path: ~/.m2/repository |
| 38 | + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
| 39 | + restore-keys: | |
| 40 | + ${{ runner.os }}-maven- |
| 41 | +
|
| 42 | + - name: Set up QEMU |
| 43 | + uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0 |
| 44 | + |
| 45 | + - name: Set up Docker Buildx |
| 46 | + uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 |
| 47 | + |
| 48 | + - name: Build and package with Maven Docker profile |
| 49 | + run: ./mvnw clean install -Pdocker -DskipTests --batch-mode --errors --show-version |
| 50 | + env: |
| 51 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 52 | + |
| 53 | + - name: Run Benchmark Unit Tests with Coverage |
| 54 | + run: ./mvnw verify --batch-mode --errors --fail-never --show-version -Dgroups=benchmark -Dsurefire.includes=**/*Benchmark.java |
| 55 | + env: |
| 56 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 57 | + |
| 58 | + - name: Tests Reporter |
| 59 | + uses: dorny/test-reporter@a43b3a5f7366b97d083190328d2c652e1a8b6aa2 # v3.0.0 |
| 60 | + if: success() || failure() |
| 61 | + with: |
| 62 | + name: IT Tests Report |
| 63 | + path: "**/failsafe-reports/TEST*.xml" |
| 64 | + list-tests: "failed" |
| 65 | + list-suites: "failed" |
| 66 | + reporter: java-junit |
0 commit comments