Skip to content

Tests

Tests #308

Workflow file for this run

name: "Tests"
on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:
schedule:
- cron: '0 4 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: "
dlt ${{ matrix.dlt-version }}
Python ${{ matrix.python-version }}
"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest']
python-version: [
'3.9',
'3.14',
]
dlt-version: [
'<1.18',
'>=1.18',
]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
services:
cratedb:
image: crate/crate:nightly
ports:
- 4200:4200
- 5432:5432
env:
CRATE_HEAP_SIZE: 2g
steps:
- name: Acquire sources
uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
activate-environment: true
cache-suffix: ${{ matrix.python-version }}
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Set up project
run: |
uv pip install pip
uv pip install 'dlt[postgres]${{ matrix.dlt-version }}'
uv pip install --editable='.[develop,test]'
dlt --version
- name: Set timezone
uses: szenius/set-timezone@v2.0
with:
timezoneLinux: "Europe/Berlin"
timezoneMacos: "Europe/Berlin"
timezoneWindows: "European Standard Time"
- name: Wait for CrateDB
run: |
for _ in $(seq 1 60); do
if curl -sf http://localhost:4200/ >/dev/null; then echo "CrateDB ready"; exit 0; fi
sleep 2
done
echo "CrateDB not ready in time" >&2
exit 1
- name: Run linters and software tests
run: poe check
# https://github.com/codecov/codecov-action
- name: Upload coverage results to Codecov
uses: codecov/codecov-action@v7
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage.xml
flags: main
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: true