Skip to content

Maven and Python Tests #897

Maven and Python Tests

Maven and Python Tests #897

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.10'
- '3.11'
- '3.12'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: '8'
distribution: temurin
- name: Cache local Maven repository
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
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@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
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