Add queue in Python with multiple API features #61
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: Python application | |
on: | |
push: | |
branches: ["main", "master", "staging"] | |
pull_request: | |
branches: ["main", "master", "staging"] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
cache: "pip" | |
- name: Create and activate virtual environment | |
run: | | |
python -m venv .venv | |
source .venv/bin/activate | |
python -m pip install --upgrade pip setuptools wheel | |
- name: Install dependencies | |
run: | | |
source .venv/bin/activate | |
python -m pip install pytest maturin | |
python -m pip install -e . | |
if [ -f requirements.txt ]; then python -m pip install -r requirements.txt --no-build-isolation; fi | |
- name: Build and install Rust extension | |
run: | | |
source .venv/bin/activate | |
export VIRTUAL_ENV=$(python -c 'import sys; print(sys.base_prefix)') | |
maturin develop | |
- name: Set PYTHONPATH | |
run: | | |
source .venv/bin/activate | |
echo "PYTHONPATH=$PWD" >> $GITHUB_ENV | |
- name: Verify aura installation | |
run: | | |
source .venv/bin/activate | |
python -c "import aura" | |
- name: Test with pytest | |
run: | | |
source .venv/bin/activate | |
pytest -v |