Skip to content

Merge pull request #12 from DataTreehouse/dependabot/cargo/rustls-0.2… #230

Merge pull request #12 from DataTreehouse/dependabot/cargo/rustls-0.2…

Merge pull request #12 from DataTreehouse/dependabot/cargo/rustls-0.2… #230

# 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.7.4'
RUST_TOOLCHAIN: nightly-2024-10-28
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 --features=opcua
working-directory: ./py_chrontext
- name: pytest
run: |
source ../.venv/bin/activate
pytest
working-directory: ./py_chrontext/tests