Skip to content

Commit

Permalink
ci: try to make faster with more uv
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii committed Oct 5, 2024
1 parent 917e9d9 commit 53f6181
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ jobs:
with:
python-version: "3.x"
- uses: pre-commit/[email protected]
- name: Setup uv
uses: astral-sh/setup-uv@v3
- name: pylint
run: pipx run --python python nox -s pylint -- --output-format=github
run: uvx nox -s pylint -- --output-format=github

tests:
name: Tests on 🐍 ${{ matrix.python-version }} ${{ matrix.os }}
Expand All @@ -53,22 +55,31 @@ jobs:
with:
fetch-depth: 0

- name: Setup uv (cached)
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
if: matrix.python-version != '3.13'
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Set up Python ${{ matrix.python-version }} (uv)
if: matrix.python-version == '3.13'
run: uv python install 3.13

- name: Add locale for locale test
if: runner.os == 'Linux' && matrix.python-version != '3.10'
run: sudo locale-gen fr_FR.UTF-8

- name: Setup uv (cached)
uses: hynek/setup-cached-uv@v2

- name: Install
run: |
uv pip install --system -e.[test] pytest-github-actions-annotate-failures --reinstall-package plumbum
uv venv
uv pip install -e.[test] pytest-github-actions-annotate-failures
- name: Setup SSH tests
if: runner.os != 'Windows'
Expand All @@ -85,10 +96,10 @@ jobs:
ssh localhost -vvv "echo 'Worked!'"
- name: Test with pytest
run: pytest --cov --run-optional-tests=ssh,sudo
run: uv run pytest --cov --run-optional-tests=ssh,sudo

- name: Upload coverage
run: pipx run coveralls --service=github
run: uvx run coveralls --service=github
env:
COVERALLS_PARALLEL: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 53f6181

Please sign in to comment.