build: Reorder dependency groups (#237) #363
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
name: Run Tests | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'functime/**' | |
- 'pyproject.toml' | |
- "tests/**" | |
- '.github/workflows/test.yml' | |
pull_request: | |
types: [ review_requested ] | |
jobs: | |
test: | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Rust | |
run: rustup show | |
- name: Cache Rust | |
uses: Swatinem/rust-cache@v2 | |
- name: Create virtual environment | |
run: python3 -m venv venv | |
- name: Install functime | |
env: | |
RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down | |
run: | | |
source venv/bin/activate | |
python3 -m pip install --upgrade pip | |
python3 -m pip install maturin | |
maturin develop --extras=test,cat,xgb,lgb | |
- name: Install extra dependencies | |
run: | | |
source venv/bin/activate | |
python3 -m pip install --upgrade pip | |
- name: Test | |
env: | |
FUNCTIME__TEST_MODE: "true" | |
run: | | |
source venv/bin/activate | |
pytest tests -vv --show-capture=no --tb=line --benchmark-disable -k "not test_benchmarks" |