From a61860e6232cd4c183bba87296ce7c5541d20434 Mon Sep 17 00:00:00 2001 From: Noortheen Raja Date: Mon, 22 Apr 2024 12:21:18 +0530 Subject: [PATCH] chore: use uv for docs action --- .github/workflows/docs.yml | 7 ++++--- .github/workflows/test.yml | 7 +++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 384cacbb7..5a609624d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,6 +18,8 @@ jobs: build: if: github.repository_owner == 'xonsh' runs-on: ubuntu-latest + env: + UV_CACHE_DIR: .cache/uv name: Xonsh docs to gh-pages steps: - uses: actions/checkout@v4 @@ -27,10 +29,9 @@ jobs: python-version: "3.10" - uses: yezz123/setup-uv@v4 - name: set current week - uses: mathiasvr/command-output@v2.0.0 - id: current_week with: - run: python -c "from datetime import date; print(date.today().isocalendar().week)" + run: echo WEEK=$(date +%V) >>$GITHUB_ENV + shell: bash - name: Cache uv pip for a week id: cache-uv uses: actions/cache@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 87ceb975d..1e3d546dd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,16 +47,15 @@ jobs: python-version: ${{ matrix.python-version }} - uses: yezz123/setup-uv@v4 - name: set current week - uses: mathiasvr/command-output@v2.0.0 - id: current_week with: - run: python -c "from datetime import date; print(date.today().isocalendar().week)" + run: echo WEEK=$(date +%V) >>$GITHUB_ENV + shell: bash - name: Cache uv pip for a week id: cache-uv uses: actions/cache@v4 with: path: ${{ env.UV_CACHE_DIR }} - key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }}-${{ steps.current_week.outputs.stdout }} + key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }}-${{ env.WEEK }} restore-keys: ${{ runner.os }}-uv- - name: Install dependencies run: uv pip install --system -e ".[test]"