Skip to content

Run pytest

Run pytest #34

Workflow file for this run

# This workflow will install the dependencies and run the tests when a push is made to the main branch or when the workflow is manually triggered.
name: Run pytest
on:
push:
branches:
- main
workflow_dispatch:
jobs:
test-pip:
name: Run test matrix
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version-file: ['pyproject.toml']
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Fetch all tags
run: git fetch --prune --unshallow --tags
# - name: Extract Python version and save as env variable
# id: python-version
# run: |
# file_path="${{ github.workspace }}/${{ matrix.python-version-file }}"
# version=$(awk -F'=' '/^python/ {print $2}' "$file_path" | tr -d '~' | xargs)
# echo "Python version extracted: $version"
# echo "version=$version" >> $GITHUB_ENV
# - name: Set up Python ${{ env.version }} on ${{ matrix.os }}
# uses: actions/setup-python@v5
# with:
# python-version: ${{ env.version }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: 'pyproject.toml'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install poetry
- name: Install OpenTerrace
run: |
poetry install
- name: Run tests
run: |
poetry run pytest -n auto