From 0fb98e7808ae4774c323133f97eeb89b09d4d0e7 Mon Sep 17 00:00:00 2001 From: Jeremy Silver Date: Sun, 20 Oct 2024 13:30:40 -0400 Subject: [PATCH] ci: re-cache hatch --- .github/workflows/workflow.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 0b435d5..da5dca4 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -33,19 +33,19 @@ jobs: run: pip install hatch - name: Configure hatch run: hatch config set dirs.env.virtual .venv - # - name: Cache hatch virtualenv - # uses: actions/cache@v4 - # id: cache-venv - # with: - # path: ./.venv/ - # # cache key depends on pyproject.toml - # key: ${{ runner.os }}-venv-${{ hashFiles('pyproject.toml') }} - # restore-keys: | - # ${{ runner.os }}-venv- + - name: Cache hatch virtualenv + uses: actions/cache@v4 + id: cache-venv + with: + path: ./.venv/ + # cache key depends on pyproject.toml + key: ${{ runner.os }}-venv-${{ hashFiles('pyproject.toml') }} + restore-keys: | + ${{ runner.os }}-venv- - name: Create virtualenvs # build virtualenvs, but only if they're not already cached run: hatch env create lint && hatch env create test - # if: steps.cache-venv.outputs.cache-hit != 'true' + if: steps.cache-venv.outputs.cache-hit != 'true' - name: Lines of code (radon) run: hatch run lint:run-loc-summarize | tee loc-summary.txt - name: Upload lines of code