🐛 (CI): Fix failed CI #13
Workflow file for this run
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: Test Python | |
on: [push, pull_request] | |
env: | |
RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down | |
RUST_BACKTRACE: 1 | |
jobs: | |
test-python: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# we only use macos for fast testing | |
os: [macos-latest] | |
python-version: ['3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Create virtual environment | |
env: | |
BIN: ${{ matrix.os == 'macos-latest' && 'Scripts' || 'bin' }} | |
run: | | |
python -m venv .venv | |
- name: Install python dependencies | |
run: pip install -r requirements-dev.txt | |
- name: Set up Rust | |
run: rustup show | |
- name: Cache Rust | |
uses: Swatinem/rust-cache@v2 | |
- name: Install Plugin | |
run: | | |
export DEP_JXL_LIB=/usr/local/Cellar/jpeg-xl/0.10.2/lib | |
export DEP_BROTLI_LIB=/usr/local/Cellar/brotli/1.1.0/lib | |
export DEP_HWY_LIB=/usr/local/Cellar/highway/1.1.0/lib | |
maturin develop --features dynamic | |
- name: Test with pytest | |
run: pytest test/ --junitxml=junit/test-results-${{ matrix.python-version }}.xml | |
- name: Upload pytest test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pytest-results-${{ matrix.python-version }} | |
path: junit/test-results-${{ matrix.python-version }}.xml | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} | |