From dccab685734138639ee589ec6c726d865a864bb9 Mon Sep 17 00:00:00 2001 From: "A bot of @njzjz" <48687836+njzjz-bot@users.noreply.github.com> Date: Tue, 15 Oct 2024 17:59:14 -0400 Subject: [PATCH] chore(ci): use astral-sh/setup-uv action (#734) Generated by the task: https://github.com/njzjz-bot/njzjz-bot/issues/9. ## Summary by CodeRabbit - **Chores** - Updated workflow configurations for benchmarking and testing to improve the setup process for the `uv` tool. - Replaced the previous installation method with a new action that enables caching and specifies cache dependencies. --------- Signed-off-by: Jinzhe Zeng Co-authored-by: Jinzhe Zeng --- .github/workflows/benchmark.yml | 7 ++++++- .github/workflows/test.yml | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 1dd682776..20f8dc6d4 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -13,7 +13,12 @@ jobs: uses: actions/setup-python@v5 with: python-version: 3.12 - - run: curl -LsSf https://astral.sh/uv/install.sh | sh + - uses: astral-sh/setup-uv@v3 + with: + enable-cache: true + cache-dependency-glob: | + **/requirements*.txt + **/pyproject.toml - name: Install dependencies run: uv pip install --system .[test,amber,ase,pymatgen,benchmark] rdkit openbabel-wheel - name: Run benchmarks diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a6d23270c..0d855f4a6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,13 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - run: curl -LsSf https://astral.sh/uv/install.sh | sh + - uses: astral-sh/setup-uv@v3 + with: + enable-cache: true + cache-dependency-glob: | + **/requirements*.txt + **/pyproject.toml + cache-suffix: "py${{ matrix.python-version }}" - name: Install dependencies run: uv pip install --system .[test,amber,ase,pymatgen] coverage ./tests/plugin rdkit openbabel-wheel - name: Test