-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (45 loc) · 1.34 KB
/
python_query_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# 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