From 33bd73847c318130477c47299e0d4a7a3dac1ab1 Mon Sep 17 00:00:00 2001 From: M365Bass Date: Fri, 17 Nov 2023 11:51:10 +1100 Subject: [PATCH] yml update2 (#88) pre-install global package spfx-fast-serve in node 18 (any os) as a workaround removed sortPackage tmp logging --- .github/workflows/dispatch.yml | 3 ++- .github/workflows/pull_request.yml | 5 +++-- Tests/e2e/Commands/sortPackage.test.js | 2 -- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dispatch.yml b/.github/workflows/dispatch.yml index 81922ab..c85f31d 100644 --- a/.github/workflows/dispatch.yml +++ b/.github/workflows/dispatch.yml @@ -24,5 +24,6 @@ jobs: - uses: actions/setup-node@v3 with: node-version: ${{ matrix.version }} - - run: npm config get cache + - run: npm i -g spfx-fast-serve + if: ${{ matrix.version == 18 }} - run: npm cit diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index d7c98be..ece7c11 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -25,8 +25,9 @@ jobs: with: node-version: ${{ matrix.version }} cache: "npm" - - run: npm ci - - run: npm test + - run: npm i -g spfx-fast-serve + if: ${{ matrix.version == 18 }} + - run: npm cit coverage-report: uses: ./.github/workflows/jest_coverage_report.yml needs: run-tests diff --git a/Tests/e2e/Commands/sortPackage.test.js b/Tests/e2e/Commands/sortPackage.test.js index 14e6611..cbf0356 100644 --- a/Tests/e2e/Commands/sortPackage.test.js +++ b/Tests/e2e/Commands/sortPackage.test.js @@ -8,10 +8,8 @@ const packageJSON_filePath = join(wpFolderPath, "package.json"); beforeAll(() => { packageJSON_beforeChanges = fs.readFileSync(packageJSON_filePath, "utf8"); - console.log(`packageJSON_beforeChanges: ${packageJSON_beforeChanges}`); sortPackageCommand.sortPackage(packageJSON_filePath); packageJSON_afterChanges = fs.readFileSync(packageJSON_filePath, "utf8"); - console.log(`packageJSON_afterChanges: ${packageJSON_afterChanges}`); }); test("sortPackage: Package.json file changed", () => {