From db383a4d05a8302448d23a9bd109550756c5bb27 Mon Sep 17 00:00:00 2001 From: Aidos Kanapyanov <65722512+aidoskanapyanov@users.noreply.github.com> Date: Fri, 13 Sep 2024 19:04:01 +0500 Subject: [PATCH] ci: enable uv cache, use astral-sh official aciton (#956) --- .github/workflows/check_docs_build.yml | 8 ++++-- .github/workflows/check_tpch_queries.yml | 8 ++++-- .github/workflows/downstream_tests.yml | 16 +++++++++--- .github/workflows/extremes.yml | 32 ++++++++++++++++++------ .github/workflows/pytest.yml | 28 +++++++++++++-------- .github/workflows/random_ci_pytest.yml | 8 ++++-- 6 files changed, 72 insertions(+), 28 deletions(-) diff --git a/.github/workflows/check_docs_build.yml b/.github/workflows/check_docs_build.yml index 3b418baff..c59e67f46 100644 --- a/.github/workflows/check_docs_build.yml +++ b/.github/workflows/check_docs_build.yml @@ -18,8 +18,12 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install uv (Unix) - run: curl -LsSf https://astral.sh/uv/install.sh | sh + - name: Install uv + uses: astral-sh/setup-uv@v2 + with: + enable-cache: "true" + cache-suffix: ${{ matrix.python-version }} + cache-dependency-glob: "**requirements*.txt" - name: install-reqs run: uv pip install --upgrade tox virtualenv setuptools pip -r requirements-dev.txt --system - name: install-docs-reqs diff --git a/.github/workflows/check_tpch_queries.yml b/.github/workflows/check_tpch_queries.yml index 94cf101d5..509ebb95b 100644 --- a/.github/workflows/check_tpch_queries.yml +++ b/.github/workflows/check_tpch_queries.yml @@ -18,8 +18,12 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install uv - run: curl -LsSf https://astral.sh/uv/install.sh | sh + - name: Install uv + uses: astral-sh/setup-uv@v2 + with: + enable-cache: "true" + cache-suffix: ${{ matrix.python-version }} + cache-dependency-glob: "**requirements*.txt" - name: install-reqs run: uv pip install --upgrade -r requirements-dev.txt --system - name: local-install diff --git a/.github/workflows/downstream_tests.yml b/.github/workflows/downstream_tests.yml index c733e348d..26e9edf7a 100644 --- a/.github/workflows/downstream_tests.yml +++ b/.github/workflows/downstream_tests.yml @@ -18,8 +18,12 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install uv (Unix) - run: curl -LsSf https://astral.sh/uv/install.sh | sh + - name: Install uv + uses: astral-sh/setup-uv@v2 + with: + enable-cache: "true" + cache-suffix: ${{ matrix.python-version }} + cache-dependency-glob: "**requirements*.txt" - name: clone-altair run: | git clone https://github.com/vega/altair.git --depth=1 @@ -58,8 +62,12 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install uv (Unix) - run: curl -LsSf https://astral.sh/uv/install.sh | sh + - name: Install uv + uses: astral-sh/setup-uv@v2 + with: + enable-cache: "true" + cache-suffix: ${{ matrix.python-version }} + cache-dependency-glob: "**requirements*.txt" - name: clone-scikit-lego run: git clone https://github.com/koaning/scikit-lego.git --depth 1 - name: install-basics diff --git a/.github/workflows/extremes.yml b/.github/workflows/extremes.yml index 7e1a5586e..dfad1086b 100644 --- a/.github/workflows/extremes.yml +++ b/.github/workflows/extremes.yml @@ -18,8 +18,12 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install uv (Unix) - run: curl -LsSf https://astral.sh/uv/install.sh | sh + - name: Install uv + uses: astral-sh/setup-uv@v2 + with: + enable-cache: "true" + cache-suffix: ${{ matrix.python-version }} + cache-dependency-glob: "**requirements*.txt" - name: install-minimum-versions run: uv pip install tox virtualenv setuptools pandas==0.25.3 polars==0.20.3 numpy==1.17.5 pyarrow==11.0.0 scipy==1.5.0 scikit-learn==1.1.0 tzdata --system - name: install-reqs @@ -41,8 +45,12 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install uv (Unix) - run: curl -LsSf https://astral.sh/uv/install.sh | sh + - name: Install uv + uses: astral-sh/setup-uv@v2 + with: + enable-cache: "true" + cache-suffix: ${{ matrix.python-version }} + cache-dependency-glob: "**requirements*.txt" - name: install-minimum-versions run: uv pip install tox virtualenv setuptools pandas==1.1.5 polars==0.20.3 numpy==1.17.5 pyarrow==11.0.0 scipy==1.5.0 scikit-learn==1.1.0 tzdata --system - name: install-reqs @@ -66,8 +74,12 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install uv (Unix) - run: curl -LsSf https://astral.sh/uv/install.sh | sh + - name: Install uv + uses: astral-sh/setup-uv@v2 + with: + enable-cache: "true" + cache-suffix: ${{ matrix.python-version }} + cache-dependency-glob: "**requirements*.txt" - name: install-minimum-versions run: uv pip install tox virtualenv setuptools pandas==2.0.3 polars==0.20.8 numpy==1.24.4 pyarrow==14.0.0 scipy==1.8.0 scikit-learn==1.3.0 dask[dataframe]==2024.7 tzdata --system - name: install-reqs @@ -91,8 +103,12 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install uv (Unix) - run: curl -LsSf https://astral.sh/uv/install.sh | sh + - name: Install uv + uses: astral-sh/setup-uv@v2 + with: + enable-cache: "true" + cache-suffix: ${{ matrix.python-version }} + cache-dependency-glob: "**requirements*.txt" - name: install-polars run: uv pip install polars --system - name: install-reqs diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 265442e9f..39b5c91b3 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -18,12 +18,12 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install uv (Unix) - if: runner.os != 'Windows' - run: curl -LsSf https://astral.sh/uv/install.sh | sh - - name: Install uv (Windows) - if: runner.os == 'Windows' - run: powershell -c "irm https://astral.sh/uv/install.ps1 | iex" + - name: Install uv + uses: astral-sh/setup-uv@v2 + with: + enable-cache: "true" + cache-suffix: ${{ matrix.python-version }} + cache-dependency-glob: "**requirements*.txt" - name: install-reqs run: uv pip install --upgrade tox virtualenv setuptools -r requirements-dev.txt ibis-framework[duckdb] --system - name: show-deps @@ -45,8 +45,12 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install uv (Windows) - run: powershell -c "irm https://astral.sh/uv/install.ps1 | iex" + - name: Install uv + uses: astral-sh/setup-uv@v2 + with: + enable-cache: "true" + cache-suffix: ${{ matrix.python-version }} + cache-dependency-glob: "**requirements*.txt" - name: install-reqs run: uv pip install --upgrade tox virtualenv setuptools -r requirements-dev.txt --system - name: install-modin @@ -70,8 +74,12 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install uv (Unix) - run: curl -LsSf https://astral.sh/uv/install.sh | sh + - name: Install uv + uses: astral-sh/setup-uv@v2 + with: + enable-cache: "true" + cache-suffix: ${{ matrix.python-version }} + cache-dependency-glob: "**requirements*.txt" - name: install-reqs run: uv pip install --upgrade tox virtualenv setuptools -r requirements-dev.txt --system - name: install-modin diff --git a/.github/workflows/random_ci_pytest.yml b/.github/workflows/random_ci_pytest.yml index e25bdcb68..b029aba3c 100644 --- a/.github/workflows/random_ci_pytest.yml +++ b/.github/workflows/random_ci_pytest.yml @@ -16,8 +16,12 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install uv (Unix) - run: curl -LsSf https://astral.sh/uv/install.sh | sh + - name: Install uv + uses: astral-sh/setup-uv@v2 + with: + enable-cache: "true" + cache-suffix: ${{ matrix.python-version }} + cache-dependency-glob: "**requirements*.txt" - name: install package run: uv pip install -e . --system - name: generate-random-versions