From 9de506d2a7fd49f4de5610651634a13b8ff540ae Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 20 May 2021 15:34:06 +0200 Subject: [PATCH 1/4] enable yarn cache, hopefully --- .github/workflows/codechecks.js.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codechecks.js.yml b/.github/workflows/codechecks.js.yml index c6def19b..f10f393b 100644 --- a/.github/workflows/codechecks.js.yml +++ b/.github/workflows/codechecks.js.yml @@ -19,15 +19,26 @@ jobs: node-version: [14.x] steps: - - name: Checkout project source + - name: Checkout source uses: actions/checkout@v2 - name: Install tools uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - - name: Install project dependencies - run: npm install --also=dev + # See: https://github.com/actions/cache/blob/main/examples.md#node---yarn + - name: Get Yarn cache directory + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - name: Use Yarn cache + uses: actions/cache@v2 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }} + - name: Install dependencies + run: yarn install --prefer-offline --frozen-lockfile - name: Unit tests - run: npm test + run: yarn test - name: Lint - run: npm run lint-ci \ No newline at end of file + run: yarn run lint-ci \ No newline at end of file From e08f8630dfff2625cad7e7469d31fec85219e970 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 20 May 2021 15:35:58 +0200 Subject: [PATCH 2/4] remove whitespace --- .github/workflows/codechecks.js.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/codechecks.js.yml b/.github/workflows/codechecks.js.yml index f10f393b..01e67bd5 100644 --- a/.github/workflows/codechecks.js.yml +++ b/.github/workflows/codechecks.js.yml @@ -29,7 +29,6 @@ jobs: - name: Get Yarn cache directory id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - - name: Use Yarn cache uses: actions/cache@v2 id: yarn-cache From 11b30e7eda6b7ef06ef3a246cdbd8f33f1726c11 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 20 May 2021 15:40:53 +0200 Subject: [PATCH 3/4] remove whitespace --- .github/workflows/codechecks.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codechecks.js.yml b/.github/workflows/codechecks.js.yml index 01e67bd5..f5a4d50e 100644 --- a/.github/workflows/codechecks.js.yml +++ b/.github/workflows/codechecks.js.yml @@ -25,7 +25,7 @@ jobs: uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - # See: https://github.com/actions/cache/blob/main/examples.md#node---yarn +# See: https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get Yarn cache directory id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" From 54478e6940e50c1fcd9598f6c9f3f71a7ed1bceb Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 20 May 2021 15:45:18 +0200 Subject: [PATCH 4/4] add comment with source --- .github/workflows/codechecks.js.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/codechecks.js.yml b/.github/workflows/codechecks.js.yml index f5a4d50e..2e15c8e7 100644 --- a/.github/workflows/codechecks.js.yml +++ b/.github/workflows/codechecks.js.yml @@ -1,6 +1,8 @@ # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions +# yarn cache setup from https://www.karltarvas.com/2020/12/09/github-actions-cache-yarn-install.html + name: Code checks on: