Skip to content

Update CI/CD, Ruff setting and Introduce onnx #2

Update CI/CD, Ruff setting and Introduce onnx

Update CI/CD, Ruff setting and Introduce onnx #2

Workflow file for this run

name: CI
on:
push:
branches: main
pull_request:
branches: main
env:
PYTHONUNBUFFERED: 1
FORCE_COLOR: 1
jobs:
test:
name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true
- name: Cache Poetry dependencies
uses: actions/cache@v4
with:
path: |
.venv
~/.cache/pypoetry
key: ${{ runner.os }}-py${{ matrix.python-version }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-py${{ matrix.python-version }}-poetry-
# OS-specific Poetry commands
- name: Install dependencies
run: |
poetry config virtualenvs.create false
poetry config installer.max-workers 4
poetry install --no-interaction --no-ansi --verbose
- name: Run Ruff linter
if: success()
run: poetry run ruff check .
- name: Run tests
if: success()
run: poetry run pytest tests/ --cov