fixes venv #15
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
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 GitHub Actions / Unit testsInvalid workflow file
|
||
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 |