Skip to content

Commit

Permalink
test: screen-reader
Browse files Browse the repository at this point in the history
  • Loading branch information
nmerget committed Apr 22, 2024
1 parent 35a03f0 commit be29c64
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
46 changes: 46 additions & 0 deletions .github/actions/npm-cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: "NPM Cache Action"
description: "Initialize NPM Cache"
inputs:
nodeModulesPath:
description: "Path for node_modules"
required: false
default: "**node_modules"
packageLockPath:
description: "Path for package-lock.json"
required: false
default: "**/package-lock.json"
nodeVersion:
description: "Node version"
required: false
default: "20"
runs:
using: "composite"
steps:
- name: πŸ†™ Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.nodeVersion }}
cache-dependency-path: screen-reader-test/package-lock.json

- name: Display node and npm version
shell: bash
run: |
node --version
npm --version
- name: πŸ†’ Init Cache
uses: actions/cache@v4
id: "cache"
with:
path: ${{ inputs.nodeModulesPath }}
key: ${{ runner.os }}-node-${{ inputs.nodeVersion }}-${{ hashFiles(inputs.packageLockPath) }}
restore-keys: |
${{ runner.os }}-node-${{ inputs.nodeVersion }}
- name: ⏬ NPM ci
shell: bash
working-directory: screen-reader-test
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm ci
5 changes: 3 additions & 2 deletions .github/workflows/00-init-playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
- name: ⏬ Checkout repo
uses: actions/checkout@v4

- name: πŸ”„ Init Cache Default
uses: ./.github/actions/npm-cache

- name: πŸ”„ Init Playwright
uses: ./.github/actions/playwright-cache
with:
os: ${{ matrix.os }}

0 comments on commit be29c64

Please sign in to comment.