Skip to content

Tests

Tests #589

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "10 9 * * *"
workflow_dispatch:
jobs:
run_tests:
name: Run Tests
runs-on: ubuntu-latest
timeout-minutes: 15
env:
DB_CONN_STR: ${{ vars.DB_CONN_STR }}
DB_USERNAME: ${{ vars.DB_USERNAME }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
strategy:
fail-fast: false
matrix:
java-version: ["17", "21"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: "temurin"
cache: "maven"
- name: Make Maven wrapper executable
run: chmod +x mvnw
- name: Run Maven Tests
id: run
run: ./mvnw clean test -B
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-java-${{ matrix.java-version }}
path: |
target/surefire-reports/
target/failsafe-reports/
retention-days: 7
- name: Report Status
if: always()
uses: ravsamhq/notify-slack-action@v1
with:
status: ${{ job.status }}
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}