Skip to content

Commit 0b4498c

Browse files
authored
npm no cache (Azure#406)
1 parent b534a3e commit 0b4498c

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

.github/workflows/python-publish.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ jobs:
8282
- name: Install prerequisites
8383
run: |
8484
pip install --upgrade pip setuptools wheel virtualenv
85+
npm install -g pnpm
86+
pnpm install
8587
8688
- name: Set build variables
8789
shell: bash
@@ -98,21 +100,16 @@ jobs:
98100
with:
99101
path: |
100102
.venv
101-
node_modules
102-
src/web/node_modules
103-
src/typespec-aaz/node_modules
104-
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') }}
103+
key: ${{ env.CACHE_PREFIX }}-${{ env.WEEK_NUMBER }}-${{ runner.os }}-${{ env.RUNNER_ARCH }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('requirements.txt') }}
105104
restore-keys: |
106-
${{ env.CACHE_PREFIX }}-${{ env.WEEK_NUMBER }}-${{ runner.os }}-${{ env.RUNNER_ARCH }}-${{ env.PYTHON_VERSION }}-${{ env.NODE_VERSION }}
105+
${{ env.CACHE_PREFIX }}-${{ env.WEEK_NUMBER }}-${{ runner.os }}-${{ env.RUNNER_ARCH }}-${{ env.PYTHON_VERSION }}
107106
108107
- name: Setup virtual environment (no cache hit)
109108
if: steps.virtualenv-cache.outputs.cache-hit != 'true'
110109
run: |
111110
test -d .venv || virtualenv -p $(which python) --copies --reset-app-data .venv
112111
. .venv/bin/activate
113112
pip install -e .[dev]
114-
npm install -g pnpm
115-
pnpm install
116113
117114
- name: Install editable (cache hit)
118115
if: steps.virtualenv-cache.outputs.cache-hit == 'true'

0 commit comments

Comments
 (0)