Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
evansims committed Aug 25, 2023
1 parent 4efb95b commit 03c5203
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
19 changes: 5 additions & 14 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,13 @@ runs:
using: composite

steps:
- name: Get NPM cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}

- uses: actions/cache@v3
name: Restore dependencies
id: npm-cache
- name: Setup Node
uses: actions/setup-node@v3
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
node-version: ${{ inputs.node }}
cache: 'npm'

- if: steps.npm-cache.outputs.cache-hit != 'true'
name: Install dependencies
- name: Install dependencies
shell: bash
run: npm ci --include=dev

Expand Down
6 changes: 6 additions & 0 deletions .github/actions/framework/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ runs:
using: composite

steps:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node }}
cache: 'npm'

- name: Restore build artifacts
uses: actions/cache/restore@v3
with:
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Build package
uses: ./.github/actions/build
with:
Expand Down

0 comments on commit 03c5203

Please sign in to comment.