Skip to content

Commit

Permalink
Test using a composite action to wrap all the node config
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Aug 16, 2024
1 parent f5eeb7e commit 8aeb38e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/js_lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,9 @@ concurrency:
jobs:
client-unit-test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [20.16.0]
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node}}
cache: 'yarn'
cache-dependency-path: 'client/yarn.lock'
- uses: ./.github/workflows/setup-node.yaml
- run: yarn install --frozen-lockfile
working-directory: client
- name: Run ESLint
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/setup-node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Setup Node.js'
description: 'Sets up Node.js and installs dependencies'
inputs:
node-version:
description: 'The Node.js version to use'
required: true
default: '20.16.0'
cache:
description: 'Whether to cache dependencies'
required: false
default: 'yarn'
cache-dependency-path:
description: 'The path to the dependency file to cache'
required: false
default: 'client/yarn.lock'
runs:
using: "composite"
steps:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: ${{ inputs.cache }}
cache-dependency-path: ${{ inputs.cache-dependency-path }}

0 comments on commit 8aeb38e

Please sign in to comment.