Closed budarin closed 1 year ago
Appreciate you sharing that snippet, @budarin: exactly what I was looking for use in a GitHub Action workflow. Thanks!
- name: Set up Node
uses: actions/setup-node@v4.0.2
with:
node-version: "20"
- name: Cache Node modules
id: cache_node_modules
uses: actions/cache@v4.0.0
with:
path: |
~/.cache/ms-playwright
node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- name: Install Node dependencies
if: steps.cache_node_modules.outputs.cache-hit != 'true'
run: npm ci
- name: Install Playwright dependencies
if: steps.cache_node_modules.outputs.cache-hit != 'true'
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
Here is the repo
wf:
cache is create in post action
But the next time the action is launched, it does not find this cache for some unknown reasons, although it is there!