Changes to start to support postgres api and better timeseries db com… #132
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
# Adapted from https://github.com/pola-rs/polars/blob/main/.github/workflows/release-python.yml | |
# With license found in chrontext/licensing/POLARS_LICENSE | |
name: Python query tests | |
on: | |
push: | |
branches: [ main, feature/*, bugfix/* ] | |
pull_request: | |
branches: [ main, feature/*, bugfix/* ] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_LOG: debug | |
MATURIN_VERSION: '1.5.1' | |
RUST_TOOLCHAIN: nightly-2024-04-10 | |
jobs: | |
build_and_test: | |
runs-on: | |
group: ubuntu_runners | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Fix README symlink | |
run: | | |
rm py_chrontext/README.md | |
cp README.md py_chrontext/README.md | |
- name: Install dependencies | |
run: | | |
python -m venv .venv | |
source .venv/bin/activate | |
pip install --upgrade pip | |
pip install -r tests/requirements.txt | |
pip install "maturin[patchelf]"==${{ env.MATURIN_VERSION }} | |
working-directory: ./py_chrontext | |
- name: Set up nightly rust | |
run: | | |
rustup toolchain install ${{ env.RUST_TOOLCHAIN }} | |
rustup default ${{ env.RUST_TOOLCHAIN }} | |
- name: Build install package | |
run: | | |
source .venv/bin/activate | |
maturin develop | |
working-directory: ./py_chrontext | |
- name: pytest | |
run: | | |
source ../.venv/bin/activate | |
pytest | |
working-directory: ./py_chrontext/tests |