Skip to content

chore(ci): use poetry env use for windows runs #4

chore(ci): use poetry env use for windows runs

chore(ci): use poetry env use for windows runs #4

Workflow file for this run

name: CI/CD
on:
push:
branches-ignore:
- 'dependabot/**'
paths-ignore:
- '.gitignore'
- '.mergify.yml'
- 'CHANGELOG.md'
- 'LICENSE'
- 'README.md'
- 'renovate.json'
pull_request:
workflow_dispatch:
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
python-version:
- '3.10'
- '3.11'
runs-on: ${{ matrix.os }}
name: Run tests on Python ${{ matrix.python-version }}, on ${{ matrix.os }}
timeout-minutes: 45
concurrency:
group: ${{ github.workflow }}-run-unit-tests-${{ matrix.python-version }}-${{ matrix.os }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: pip install poetry
- name: Checkout code
uses: actions/checkout@v4
- name: Override Python version for Poetry
run: sed -i -e 's#^python\s*=.*$#python = "^${{ matrix.python-version }}"#g' pyproject.toml
- name: Restore Python dependencies
run: poetry lock && poetry install
- name: Test
shell: bash
run: |
poetry env use .venv/bin/python
python -m unittest discover -v -s tests