Skip to content

bugfix: handle case when no variants are in file by merging tasks tog… #4046

bugfix: handle case when no variants are in file by merging tasks tog…

bugfix: handle case when no variants are in file by merging tasks tog… #4046

Workflow file for this run

name: unit tests
# Run the test suite on pushes (incl. merges) to main and dev
# Run the test suite when a PR is opened, pushed to, or reopened
on:
push:
branches:
- dev
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
unit_tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
steps:
- uses: actions/checkout@v3
- name: Create ClickHouse Config
run: |
cat <<EOF > test_config.xml
<clickhouse>
<user_files_path>/tmp</user_files_path>
</clickhouse>
EOF
- name: Start ClickHouse with mounted config
run: |
docker run -d --name clickhouse \
-v ${{ github.workspace }}/test_config.xml:/etc/clickhouse-server/config.d/config.xml \
-v /tmp:/tmp \
-p 9000:9000 \
-e CLICKHOUSE_USER=default \
-e CLICKHOUSE_PASSWORD=default_password \
bitnamilegacy/clickhouse:latest
- name: Wait for ClickHouse
run: |
until docker exec clickhouse clickhouse-client --query "SELECT 1"; do
echo "Waiting for ClickHouse to start..."
sleep 2
done
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# Install uv
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
**/uv.lock
**/pyproject.toml
- name: Sync dependencies (prod + dataproc)
run: uv sync --locked
- name: Check Ruff Format
run: uv run ruff format --check v03_pipeline --diff
- name: Check Ruff
run: uv run ruff check --output-format github
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
severity: error
scandir: './v03_pipeline/bin'
- name: Unit Tests
run: |
export ACCESS_PRIVATE_REFERENCE_DATASETS=1
export CLICKHOUSE_OPTIMIZE_TABLE_WAIT_S=1
export PYSPARK_SUBMIT_ARGS='--driver-memory 8G pyspark-shell'
export CLICKHOUSE_DATABASE=test
uv run nosetests --with-coverage --cover-package v03_pipeline v03_pipeline
uv run coverage report --omit '*test*' --fail-under=90