Stop installing into CI's system (#1346)

* Stop installing into CI's system

We're starting to get permission denied errors when installing with
--system.

* Pin Pyright

* Simplify

* Fix typo
This commit is contained in:
Hynek Schlawack 2024-09-14 14:59:01 +02:00 committed by GitHub
parent 2f1014aa60
commit ec5bc55caf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 19 deletions

View File

@ -70,18 +70,17 @@ jobs:
echo DO_MYPY=$DO_MYPY >>$GITHUB_ENV echo DO_MYPY=$DO_MYPY >>$GITHUB_ENV
echo TOX_PYTHON=py$(echo $V | tr -d .) >>$GITHUB_ENV echo TOX_PYTHON=py$(echo $V | tr -d .) >>$GITHUB_ENV
uv pip install --system tox - run: >
uvx --with=tox-uv
- run: uv pip install --system tox-uv tox run
-e ${{ env.TOX_PYTHON }}-mypy
- run: python -Im tox run -e ${{ env.TOX_PYTHON }}-mypy
if: env.DO_MYPY == '1' if: env.DO_MYPY == '1'
- name: Remove src to ensure tests run against wheel - name: Remove src to ensure tests run against wheel
run: rm -rf src run: rm -rf src
- run: > - run: >
python -Im uvx --with=tox-uv
tox run tox run
--installpkg dist/*.whl --installpkg dist/*.whl
-e ${{ env.TOX_PYTHON }}-tests -e ${{ env.TOX_PYTHON }}-tests
@ -121,10 +120,8 @@ jobs:
allow-prereleases: true allow-prereleases: true
- uses: hynek/setup-cached-uv@v2 - uses: hynek/setup-cached-uv@v2
- run: uv pip install --system tox-uv
- run: > - run: >
python -Im uvx --with=tox-uv
tox run tox run
--installpkg dist/*.whl --installpkg dist/*.whl
-e pypy3-tests -e pypy3-tests
@ -154,16 +151,16 @@ jobs:
- name: Combine coverage & fail if it's <100%. - name: Combine coverage & fail if it's <100%.
run: | run: |
uv pip install --system coverage[toml] uv tool install 'coverage[toml]'
python -Im coverage combine coverage combine
python -Im coverage html --skip-covered --skip-empty coverage html --skip-covered --skip-empty
# Report and write to summary. # Report and write to summary.
python -Im coverage report --format=markdown >> $GITHUB_STEP_SUMMARY coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
# Report again and fail if under 100%. # Report again and fail if under 100%.
python -Im coverage report --fail-under=100 coverage report --fail-under=100
- name: Upload HTML report if check failed. - name: Upload HTML report if check failed.
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
@ -189,8 +186,7 @@ jobs:
python-version: "3.12" python-version: "3.12"
- uses: hynek/setup-cached-uv@v2 - uses: hynek/setup-cached-uv@v2
- run: uv pip install --system tox-uv - run: uvx --with=tox-uv tox run -e docs,changelog
- run: python -Im tox run -e docs,changelog
pyright: pyright:
name: Check types using pyright name: Check types using pyright
@ -202,8 +198,7 @@ jobs:
python-version-file: .python-version-default python-version-file: .python-version-default
- uses: hynek/setup-cached-uv@v2 - uses: hynek/setup-cached-uv@v2
- run: uv pip install --system tox-uv - run: uvx --with=tox-uv tox run -e pyright
- run: python -Im tox run -e pyright
install-dev: install-dev:
name: Verify dev env name: Verify dev env

View File

@ -113,7 +113,7 @@ commands =
[testenv:pyright] [testenv:pyright]
extras = tests extras = tests
deps = pyright deps = pyright<1.1.380
commands = pytest tests/test_pyright.py -vv commands = pytest tests/test_pyright.py -vv