Skip to content

a

a #1157

Workflow file for this run

name: Tests
on:
push:
branches: [ fix-ci2 ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
CI: true
CACHE_MODELS_DIR: "models"
jobs:
test:
strategy:
matrix:
python-version:
- '3.10.x'
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
name: Python ${{ matrix.python-version }} on ${{ matrix.os }} test
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install poetry
poetry config virtualenvs.create false
poetry install --no-interaction --no-ansi --without docs --with dev
- name: Run pytest (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
New-Item -Path $CACHE_MODELS_DIR -ItemType Directory -Force
icacls $CACHE_MODELS_DIR /grant "${env:USERNAME}:(OI)(CI)F"
Push-Location $CACHE_MODELS_DIR
try {
poetry run pytest
}
finally {
Pop-Location
Remove-Item $CACHE_MODELS_DIR -Recurse -Force
}
- name: Run pytest (Non-Windows)
if: runner.os != 'Windows'
run: |
poetry run pytest
permissions:
contents: read