From 81445398893a8e7873bf72425417ccf999b3bf67 Mon Sep 17 00:00:00 2001 From: Evan Sims Date: Thu, 24 Aug 2023 18:22:56 -0500 Subject: [PATCH] Update workflows --- .github/actions/build/action.yml | 17 ++++++++++++++++- .github/actions/framework/action.yml | 19 +++++++++++++++++++ .github/workflows/test.yml | 4 ++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index fd5a28a0f..3cf8d4207 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -17,7 +17,22 @@ runs: node-version: ${{ inputs.node }} cache: 'npm' - - name: Install dependencies + - 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 + with: + path: ${{ steps.npm-cache-dir.outputs.dir }} + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - if: steps.npm-cache.outputs.cache-hit != 'true' + name: Install dependencies shell: bash run: npm ci diff --git a/.github/actions/framework/action.yml b/.github/actions/framework/action.yml index 4b76d33de..1af942373 100644 --- a/.github/actions/framework/action.yml +++ b/.github/actions/framework/action.yml @@ -35,6 +35,25 @@ runs: path: . key: ${{ inputs.cache }} + - 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 + with: + path: ${{ steps.npm-cache-dir.outputs.dir }} + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - if: steps.npm-cache.outputs.cache-hit != 'true' + name: Install dependencies + shell: bash + run: npm ci + - name: Create application shell: bash run: ${{ inputs.install }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 903d4dc91..f60abf993 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -122,6 +122,10 @@ jobs: name: Gatsby Tests runs-on: ubuntu-latest + env: + IMPORT_STATEMENT: | + import './../auth0'; + steps: - name: Checkout code uses: actions/checkout@v3