From 0681cc28ffc36d0356aacf29dc589405ec2dbf8a Mon Sep 17 00:00:00 2001 From: Sergey Vasilyev Date: Sat, 3 Oct 2026 15:43:53 +0200 Subject: [PATCH] Switch to pure uv, no setup-python in CI Signed-off-by: Sergey Vasilyev --- .github/workflows/ci.yaml | 22 +++++++++++++--------- .github/workflows/publish.yaml | 4 +++- .github/workflows/thorough.yaml | 22 +++++++++++++--------- 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 893a651..5c1883f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,12 +13,14 @@ jobs: steps: - uses: actions/checkout@v7 - uses: astral-sh/setup-uv@v10.2.0 - - uses: actions/setup-python@v7 with: + github-token: ${{ github.token }} + enable-cache: true python-version: "3.14" + activate-environment: true - run: uv sync --no-dev --group lint - - run: uv run --no-sync pre-commit run --all-files - - run: uv run --no-sync mypy + - run: pre-commit run --all-files + - run: mypy unit-tests: strategy: @@ -32,12 +34,13 @@ jobs: steps: - uses: actions/checkout@v7 - uses: astral-sh/setup-uv@v10.2.0 - - uses: actions/setup-python@v7 with: + github-token: ${{ github.token }} + enable-cache: true python-version: ${{ matrix.python-version }} - + activate-environment: true - run: uv sync --no-dev --group test - - run: uv run --no-sync coverage run --branch --source=looptime -m pytest --color=yes + - run: coverage run --branch --source=looptime -m pytest --color=yes - name: Publish coverage to Coveralls.io uses: coverallsapp/github-action@v2 @@ -69,12 +72,13 @@ jobs: steps: - uses: actions/checkout@v7 - uses: astral-sh/setup-uv@v10.2.0 - - uses: actions/setup-python@v7 with: + github-token: ${{ github.token }} + enable-cache: true python-version: ${{ matrix.python-version }} - + activate-environment: true - run: uv sync --no-dev --group test - - run: uv run --no-sync pytest --color=yes --no-cov + - run: pytest --color=yes --no-cov coveralls-finish: name: Finalize coveralls.io diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 815d90c..f147e18 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -17,9 +17,11 @@ jobs: steps: - uses: actions/checkout@v7 - uses: astral-sh/setup-uv@v10.2.0 - - uses: actions/setup-python@v7 with: + github-token: ${{ github.token }} + enable-cache: true python-version: "3.14" + activate-environment: true - run: uv build - uses: pypa/gh-action-pypi-publish@release/v1 with: diff --git a/.github/workflows/thorough.yaml b/.github/workflows/thorough.yaml index 3314b8b..02dfc89 100644 --- a/.github/workflows/thorough.yaml +++ b/.github/workflows/thorough.yaml @@ -15,12 +15,14 @@ jobs: steps: - uses: actions/checkout@v7 - uses: astral-sh/setup-uv@v10.2.0 - - uses: actions/setup-python@v7 with: + github-token: ${{ github.token }} + enable-cache: true python-version: "3.14" + activate-environment: true - run: uv sync --no-dev --group lint - - run: uv run --no-sync pre-commit run --all-files - - run: uv run --no-sync mypy + - run: pre-commit run --all-files + - run: mypy unit-tests: strategy: @@ -34,12 +36,13 @@ jobs: steps: - uses: actions/checkout@v7 - uses: astral-sh/setup-uv@v10.2.0 - - uses: actions/setup-python@v7 with: + github-token: ${{ github.token }} + enable-cache: true python-version: ${{ matrix.python-version }} - + activate-environment: true - run: uv sync --no-dev --group test - - run: uv run --no-sync coverage run --branch --source=looptime -m pytest --color=yes + - run: coverage run --branch --source=looptime -m pytest --color=yes - name: Publish coverage to Coveralls.io uses: coverallsapp/github-action@v2 @@ -71,12 +74,13 @@ jobs: steps: - uses: actions/checkout@v7 - uses: astral-sh/setup-uv@v10.2.0 - - uses: actions/setup-python@v7 with: + github-token: ${{ github.token }} + enable-cache: true python-version: ${{ matrix.python-version }} - + activate-environment: true - run: uv sync --no-dev --group test - - run: uv run --no-sync pytest --color=yes --no-cov + - run: pytest --color=yes --no-cov coveralls-finish: name: Finalize coveralls.io