Adding headless improvements and automatic bootstrapping #90
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Python tests | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main", "develop" ] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest ] | |
python-version: [ '3.10', '3.11' ] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies (Ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
poetry install --all-extras | |
- name: Install dependencies (Windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
poetry install | |
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 | |
- name: Test with pytest | |
run: | | |
cd tests | |
poetry run pytest --disable-warnings | |
- name: Run pip-audit dependency check | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
output=$(poetry run pip-audit 2>&1) || true | |
echo "$output" |