diff --git a/.github/workflows/builddoc.yml b/.github/workflows/builddoc.yml index f03a4ec38..7f8471dee 100644 --- a/.github/workflows/builddoc.yml +++ b/.github/workflows/builddoc.yml @@ -31,11 +31,10 @@ jobs: - name: Install graphviz run: sudo apt-get install --no-install-recommends --yes graphviz - name: Install uv - run: > - curl --no-progress-meter --location --fail - --proto '=https' --tlsv1.2 - "https://astral.sh/uv/install.sh" - | sh + uses: astral-sh/setup-uv@v5 + with: + version: latest + enable-cache: false - name: Install dependencies run: uv pip install .[docs] - name: Render the documentation diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index adbbc5e03..ba71152b6 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -35,11 +35,10 @@ jobs: with: python-version: "3" - name: Install uv - run: > - curl --no-progress-meter --location --fail - --proto '=https' --tlsv1.2 - "https://astral.sh/uv/install.sh" - | sh + uses: astral-sh/setup-uv@v5 + with: + version: latest + enable-cache: false - name: Install build dependencies (pypa/build, twine) run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index bd8ecf362..c8444c6a1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -31,19 +31,17 @@ jobs: RUFF_VERSION=$(awk -F'[="]' '/\[project\.optional-dependencies\]/ {p=1} /ruff/ {if (p) print $4}' pyproject.toml) echo "RUFF_VERSION=$RUFF_VERSION" >> $GITHUB_ENV - - name: Install Ruff - run: > - curl --no-progress-meter --location --fail - --proto '=https' --tlsv1.2 - --write-out "%{stderr}Downloaded: %{url}\n" - "https://astral.sh/ruff/$RUFF_VERSION/install.sh" - | sh + - name: Install Ruff ${{ env.RUFF_VERSION }} + uses: astral-sh/ruff-action@v3 + with: + args: --version + version: ${{ env.RUFF_VERSION }} - name: Lint with Ruff - run: ruff check . --output-format github + run: ruff check --output-format=github - name: Format with Ruff - run: ruff format . --diff + run: ruff format --diff mypy: runs-on: ubuntu-latest @@ -57,11 +55,10 @@ jobs: with: python-version: "3" - name: Install uv - run: > - curl --no-progress-meter --location --fail - --proto '=https' --tlsv1.2 - "https://astral.sh/uv/install.sh" - | sh + uses: astral-sh/setup-uv@v5 + with: + version: latest + enable-cache: false - name: Install dependencies run: uv pip install ".[lint,test]" - name: Type check with mypy @@ -79,11 +76,10 @@ jobs: with: python-version: "3" - name: Install uv - run: > - curl --no-progress-meter --location --fail - --proto '=https' --tlsv1.2 - "https://astral.sh/uv/install.sh" - | sh + uses: astral-sh/setup-uv@v5 + with: + version: latest + enable-cache: false - name: Install dependencies run: uv pip install ".[lint,test]" - name: Type check with pyright @@ -101,11 +97,10 @@ jobs: with: python-version: "3" - name: Install uv - run: > - curl --no-progress-meter --location --fail - --proto '=https' --tlsv1.2 - "https://astral.sh/uv/install.sh" - | sh + uses: astral-sh/setup-uv@v5 + with: + version: latest + enable-cache: false - name: Install dependencies run: uv pip install --upgrade sphinx-lint - name: Lint documentation with sphinx-lint @@ -123,11 +118,10 @@ jobs: with: python-version: "3" - name: Install uv - run: > - curl --no-progress-meter --location --fail - --proto '=https' --tlsv1.2 - "https://astral.sh/uv/install.sh" - | sh + uses: astral-sh/setup-uv@v5 + with: + version: latest + enable-cache: false - name: Install dependencies run: uv pip install --upgrade twine build - name: Lint with twine diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index caf633d37..4b3b32835 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -58,11 +58,10 @@ jobs: - name: Install graphviz run: sudo apt-get install --no-install-recommends --yes graphviz - name: Install uv - run: > - curl --no-progress-meter --location --fail - --proto '=https' --tlsv1.2 - "https://astral.sh/uv/install.sh" - | sh + uses: astral-sh/setup-uv@v5 + with: + version: latest + enable-cache: false - name: Install dependencies run: uv pip install .[test] - name: Install Docutils ${{ matrix.docutils }} @@ -198,9 +197,10 @@ jobs: - name: Install graphviz run: choco install --no-progress graphviz - name: Install uv - run: > - Invoke-WebRequest -Uri "https://astral.sh/uv/install.ps1" - | Invoke-Expression + uses: astral-sh/setup-uv@v5 + with: + version: latest + enable-cache: false - name: Install dependencies run: uv pip install .[test] - name: Test with pytest @@ -232,11 +232,10 @@ jobs: - name: Install graphviz run: sudo apt-get install --no-install-recommends --yes graphviz - name: Install uv - run: > - curl --no-progress-meter --location --fail - --proto '=https' --tlsv1.2 - "https://astral.sh/uv/install.sh" - | sh + uses: astral-sh/setup-uv@v5 + with: + version: latest + enable-cache: false - name: Install dependencies run: uv pip install .[test] - name: Install Docutils' HEAD @@ -266,11 +265,10 @@ jobs: - name: Install graphviz run: sudo apt-get install --no-install-recommends --yes graphviz - name: Install uv - run: > - curl --no-progress-meter --location --fail - --proto '=https' --tlsv1.2 - "https://astral.sh/uv/install.sh" - | sh + uses: astral-sh/setup-uv@v5 + with: + version: latest + enable-cache: false - name: Install dependencies run: | uv pip install .[test] --resolution lowest-direct @@ -298,11 +296,10 @@ jobs: - name: Check Python version run: python --version --version - name: Install uv - run: > - curl --no-progress-meter --location --fail - --proto '=https' --tlsv1.2 - "https://astral.sh/uv/install.sh" - | sh + uses: astral-sh/setup-uv@v5 + with: + version: latest + enable-cache: false - name: Install dependencies run: uv pip install .[test] - name: Test with pytest @@ -330,11 +327,10 @@ jobs: - name: Install graphviz run: sudo apt-get install --no-install-recommends --yes graphviz - name: Install uv - run: > - curl --no-progress-meter --location --fail - --proto '=https' --tlsv1.2 - "https://astral.sh/uv/install.sh" - | sh + uses: astral-sh/setup-uv@v5 + with: + version: latest + enable-cache: false - name: Install dependencies run: uv pip install .[test] pytest-cov - name: Test with pytest diff --git a/.github/workflows/transifex.yml b/.github/workflows/transifex.yml index f240d69a8..9f4698ead 100644 --- a/.github/workflows/transifex.yml +++ b/.github/workflows/transifex.yml @@ -27,8 +27,13 @@ jobs: mkdir -p /tmp/tx_cli && cd $_ curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash shell: bash + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + version: latest + enable-cache: false - name: Install dependencies - run: pip install --upgrade babel jinja2 + run: uv pip install --upgrade babel jinja2 - name: Extract translations from source code run: python utils/babel_runner.py extract - name: Push translations to transifex.com @@ -58,8 +63,13 @@ jobs: mkdir -p /tmp/tx_cli && cd $_ curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash shell: bash + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + version: latest + enable-cache: false - name: Install dependencies - run: pip install --upgrade babel jinja2 + run: uv pip install --upgrade babel jinja2 - name: Extract translations from source code run: python utils/babel_runner.py extract - name: Pull translations from transifex.com