From 72a8f610c892b49c9323d8e8420e010995a4f3a6 Mon Sep 17 00:00:00 2001 From: Rob Larsen Date: Tue, 9 Apr 2024 22:53:17 -0400 Subject: [PATCH] Fixing tests on Windows + Windows test action (#3110) * Updates for gulp 5 * .DS_Store ignored from copy operations --- .github/workflows/test-windows.yaml | 36 +++++++++++++++++++++++++++++ package-lock.json | 4 ++-- test/file_existence.mjs | 3 ++- 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/test-windows.yaml diff --git a/.github/workflows/test-windows.yaml b/.github/workflows/test-windows.yaml new file mode 100644 index 0000000000..6b30640fe5 --- /dev/null +++ b/.github/workflows/test-windows.yaml @@ -0,0 +1,36 @@ + +name: Build status + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + build: + runs-on: windows-latest + strategy: + matrix: + node-version: [18.x, 20.x] + steps: + - name: Get npm cache directory + id: npm-cache + run: | + echo "dir=$(npm config get cache)" >> "$GITHUB_OUTPUT" + - uses: actions/cache@v3 + with: + path: ${{ steps.npm-cache.outputs.dir }} + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - uses: actions/checkout@v4 + - name: Run tests ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm test diff --git a/package-lock.json b/package-lock.json index e619f057a2..c82b998d79 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,8 +26,8 @@ "strip-json-comments": "^5.0.1" }, "engines": { - "node": ">=16", - "npm": ">=8" + "node": ">=18", + "npm": ">=10" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/test/file_existence.mjs b/test/file_existence.mjs index 8e92a21616..d45bd56655 100644 --- a/test/file_existence.mjs +++ b/test/file_existence.mjs @@ -56,7 +56,8 @@ function checkFiles(directory, expectedFiles) { '**/.cache/**', ], dot: true, // include hidden files - mark: true, // add a `/` character to directory matches + mark: true, // add a `/` character to directory matches, + posix: true, //https://github.com/isaacs/node-glob/issues/467 }); // Check if all expected files are present in the