Skip to content

Commit

Permalink
npm no cache (Azure#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
AllyW authored Sep 26, 2024
1 parent b534a3e commit 0b4498c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ jobs:
- name: Install prerequisites
run: |
pip install --upgrade pip setuptools wheel virtualenv
npm install -g pnpm
pnpm install
- name: Set build variables
shell: bash
Expand All @@ -98,21 +100,16 @@ jobs:
with:
path: |
.venv
node_modules
src/web/node_modules
src/typespec-aaz/node_modules
key: ${{ env.CACHE_PREFIX }}-${{ env.WEEK_NUMBER }}-${{ runner.os }}-${{ env.RUNNER_ARCH }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('requirements.txt') }}-${{ env.NODE_VERSION }}-${{ hashFiles('pnpm-lock.yaml') }}
key: ${{ env.CACHE_PREFIX }}-${{ env.WEEK_NUMBER }}-${{ runner.os }}-${{ env.RUNNER_ARCH }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ env.CACHE_PREFIX }}-${{ env.WEEK_NUMBER }}-${{ runner.os }}-${{ env.RUNNER_ARCH }}-${{ env.PYTHON_VERSION }}-${{ env.NODE_VERSION }}
${{ env.CACHE_PREFIX }}-${{ env.WEEK_NUMBER }}-${{ runner.os }}-${{ env.RUNNER_ARCH }}-${{ env.PYTHON_VERSION }}
- name: Setup virtual environment (no cache hit)
if: steps.virtualenv-cache.outputs.cache-hit != 'true'
run: |
test -d .venv || virtualenv -p $(which python) --copies --reset-app-data .venv
. .venv/bin/activate
pip install -e .[dev]
npm install -g pnpm
pnpm install
- name: Install editable (cache hit)
if: steps.virtualenv-cache.outputs.cache-hit == 'true'
Expand Down

0 comments on commit 0b4498c

Please sign in to comment.