feat: remove test_*.py
indirection for consumer tests (#161)
#431
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
consumers: | |
name: Run consumer tests | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
consumer: [datafusion, duckdb] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
cache: 'pip' | |
- name: Install Python dependencies | |
run: pip install -r requirements.txt | |
- name: Run functions tests | |
run: pytest -v -m consume_substrait_snapshot --consumer=${{ matrix.consumer }} substrait_consumer/tests/functional/extension_functions | |
- name: Run relations tests | |
run: pytest -v -m consume_substrait_snapshot --consumer=${{ matrix.consumer }} substrait_consumer/tests/functional/relations | |
producers: | |
name: Run producer tests | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
producer: [datafusion, duckdb, ibis, isthmus] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
cache: 'pip' | |
- name: Install Python dependencies | |
run: pip install -r requirements.txt | |
- name: Install Java | |
uses: actions/setup-java@v4 | |
if: ${{ matrix.producer == 'isthmus' }} | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Setup Gradle | |
if: ${{ matrix.producer == 'isthmus' }} | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
gradle-version: 8.8 | |
- name: Build Isthmus | |
if: ${{ matrix.producer == 'isthmus' }} | |
working-directory: ./substrait-java/isthmus | |
run: ../gradlew shadowJar | |
- name: Copy Isthmus JARs | |
if: ${{ matrix.producer == 'isthmus' }} | |
run: |- | |
mkdir ./jars | |
cp substrait-java/isthmus/build/libs/*all.jar ./jars | |
- name: Run functions tests | |
run: pytest -v -m produce_substrait_snapshot --producer=${{ matrix.producer }} substrait_consumer/tests/functional/extension_functions | |
- name: Run relations tests | |
run: pytest -v -m produce_substrait_snapshot --producer=${{ matrix.producer }} substrait_consumer/tests/functional/relations | |
- name: Run Ibis expression tests | |
if: ${{ matrix.producer == 'ibis' }} | |
run: pytest substrait_consumer/functional/queries/ibis_expressions/ | |
integration: | |
name: Run integration tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
cache: 'pip' | |
- name: Install Python dependencies | |
run: pip install -r requirements.txt | |
- name: Install Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
gradle-version: 8.8 | |
- name: Build Isthmus | |
working-directory: ./substrait-java/isthmus | |
run: ../gradlew shadowJar | |
- name: Copy Isthmus JARs | |
run: |- | |
mkdir ./jars | |
cp substrait-java/isthmus/build/libs/*all.jar ./jars | |
- name: Run integration tests | |
run: pytest -v substrait_consumer/tests/integration |