From bbfad2f35fb8c53854e4d0e332f344fe1ddf12d7 Mon Sep 17 00:00:00 2001 From: Jim Ehrismann <40840436+jim-docker@users.noreply.github.com> Date: Mon, 12 Apr 2021 23:57:56 -0400 Subject: [PATCH 1/2] Modified kubeconfig manager test to avoid intermittent ENXIO error (#2516) * modified kubeconfig manager test to avoid intermittent ENXIO error Signed-off-by: Jim Ehrismann * fix lint Signed-off-by: Jim Ehrismann --- src/main/__test__/kubeconfig-manager.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/__test__/kubeconfig-manager.test.ts b/src/main/__test__/kubeconfig-manager.test.ts index a272d1e597..1cc39a4ada 100644 --- a/src/main/__test__/kubeconfig-manager.test.ts +++ b/src/main/__test__/kubeconfig-manager.test.ts @@ -84,7 +84,9 @@ describe("kubeconfig manager tests", () => { expect(logger.error).not.toBeCalled(); expect(await kubeConfManager.getPath()).toBe(`tmp${path.sep}kubeconfig-foo`); - const file = await fse.readFile(await kubeConfManager.getPath()); + // this causes an intermittent "ENXIO: no such device or address, read" error + // const file = await fse.readFile(await kubeConfManager.getPath()); + const file = fse.readFileSync(await kubeConfManager.getPath()); const yml = loadYaml(file.toString()); expect(yml["current-context"]).toBe("minikube"); From b852384e85fbab5926447ca6c30c87beb5b88e8f Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Tue, 13 Apr 2021 12:26:36 +0300 Subject: [PATCH 2/2] Cache node_modules on GH actions (#2517) * cache node_modules on GH actions Signed-off-by: Jari Kolehmainen * tweak Signed-off-by: Jari Kolehmainen --- .github/workflows/test.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e6dbf72784..d7f3959eb8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,6 +20,18 @@ jobs: with: node-version: ${{ matrix.node-version }} + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - uses: actions/cache@v2 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: make node_modules name: Install dependencies