feat: test suites, integration tests, resolve python 3.8 support #4
This file contains hidden or 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: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| unit-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync --group dev | |
| - name: Run unit tests | |
| run: uv run pytest tests/ --ignore=tests/integration -v --tb=short | |
| integration-tests: | |
| name: integration (${{ matrix.engine }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - engine: duckdb | |
| extras_flags: "--extra duckdb --extra tpcds_datagen --extra tpch_datagen" | |
| test_file: "tests/integration/test_duckdb.py" | |
| - engine: daft | |
| extras_flags: "--extra daft --extra tpcds_datagen --extra tpch_datagen" | |
| test_file: "tests/integration/test_daft.py" | |
| - engine: polars | |
| extras_flags: "--extra polars --extra tpcds_datagen --extra tpch_datagen" | |
| test_file: "tests/integration/test_polars.py" | |
| - engine: spark | |
| extras_flags: "--extra spark --extra tpcds_datagen --extra tpch_datagen" | |
| test_file: "tests/integration/test_spark.py" | |
| java: "17" | |
| - engine: sail | |
| extras_flags: "--extra sail --extra tpcds_datagen --extra tpch_datagen" | |
| test_file: "tests/integration/test_sail.py" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java ${{ matrix.java }} | |
| if: matrix.java != '' | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: ${{ matrix.java }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies (${{ matrix.engine }}) | |
| run: uv sync --group dev ${{ matrix.extras_flags }} | |
| - name: Run integration tests (${{ matrix.engine }}) | |
| run: uv run pytest ${{ matrix.test_file }} -v -s --tb=short -W always |