Auto activate venv when python-version is set (#194)

Closes: #124
This commit is contained in:
Kevin Stillhammer 2024-12-20 08:24:43 +01:00 committed by GitHub
parent 85aa0bf0c1
commit dd578776bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 62 additions and 18 deletions

View file

@ -143,17 +143,27 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.13t"]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Install latest version
uses: ./
with:
python-version: ${{ matrix.python-version }}
python-version: 3.13.1t
- name: Verify UV_PYTHON is set to correct version
run: |
if [ "$UV_PYTHON" != "${{ matrix.python-version }}" ]; then
echo "$UV_PYTHON"
if [ "$UV_PYTHON" != "3.13.1t" ]; then
exit 1
fi
- run: uv sync
working-directory: __tests__/fixtures/uv-project
shell: bash
- name: Verify packages can be installed
run: uv pip install --python=3.13.1t pip
shell: bash
- name: Verify python version is correct
run: |
python --version
if [ "$(python --version)" != "Python 3.13.1" ]; then
exit 1
fi
shell: bash