diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 478427f72..ebfc7e1ab 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -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 diff --git a/.github/actions/framework/action.yml b/.github/actions/framework/action.yml index c8b18e8c3..61f3e7b4a 100644 --- a/.github/actions/framework/action.yml +++ b/.github/actions/framework/action.yml @@ -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: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bd5c6ff7b..f60abf993 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: