Skip to content

fixes venv

fixes venv #15

Workflow file for this run

name: Unit tests
on: [push]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unit-tests:
runs-on: self-hosted
concurrency:
group: uses-tvpaint
cancel-in-progress: true
strategy:
fail-fast: true
max-parallel: 1
matrix:
python-version: [python39, python310, python311, python]
env:
VENV_PATH: ${{ github.workspace }}/env_${{ matrix.python-version }}
VENV_SCRIPTS: ${{ env.VENV_PATH }}/Scripts

Check failure on line 25 in .github/workflows/tests.yml

View workflow run for this annotation

GitHub Actions / Unit tests

Invalid workflow file

The workflow is not valid. .github/workflows/tests.yml (Line: 25, Col: 21): Unrecognized named-value: 'env'. Located at position 1 within expression: env.VENV_PATH .github/workflows/tests.yml (Line: 26, Col: 16): Unrecognized named-value: 'env'. Located at position 1 within expression: env.VENV_SCRIPTS
PIP_EXE: ${{ env.VENV_SCRIPTS }}/pip.exe
POETRY_EXE: ${{ env.VENV_SCRIPTS }}/poetry.exe
steps:
- uses: actions/checkout@v4
- name: Switching Python version
run: scoop reset ${{ matrix.python-version }}
- name: Setup Poetry in venv
run: |
python -m venv ${{ env.VENV_PATH }}
${{ env.PIP_EXE }} install --quiet poetry
- name: Installing dependencies with Poetry...
run: |
rm -r ${{ github.workspace }}/.venv
${{ env.POETRY_EXE }} config virtualenvs.in-project true
${{ env.POETRY_EXE }} install --no-interaction --with test
- name: Pytest with coverage
run: ${{ env.VENV_PATH }}/Scripts/poetry.exe run pytest --maxfail 5 --cov=pytvpaint