Skip to content

Maven and Python Tests #837

Maven and Python Tests

Maven and Python Tests #837

Workflow file for this run

name: Maven and Python Tests
'on':
pull_request:
types:
- opened
- edited
- synchronize
- reopened
schedule:
- cron: 0 0 * * *
jobs:
test:
strategy:
matrix:
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: '8'
distribution: temurin
- name: Cache local Maven repository
uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3.5.0
with:
path: ~/.m2/repository
key: '${{ runner.os }}-maven-${{ hashFiles(''**/pom.xml'') }}'
restore-keys: |
${{ runner.os }}-maven-
- name: Generate JAR file
run: mvn clean package -DskipTests
- name: Run Maven tests
run: mvn test
- uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
with:
python-version: '${{ matrix.python-version }}'
cache: pip
- name: Install Python test dependencies
run: |
pip install --upgrade pip
pip install -r src/test/python/requirements.txt
- name: Run Python tests
run: pytest