Skip to content

Commit

Permalink
Fixing tests on Windows + Windows test action
Browse files Browse the repository at this point in the history
* Updates for gulp 5

* .DS_Store ignored from copy operations
  • Loading branch information
roblarsen committed Apr 9, 2024
1 parent d00a4b9 commit 674a723
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 8 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/test-windows.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion dist/css/style.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! HTML5 Boilerplate v9.0.0-RC1 | MIT License | https://html5boilerplate.com/ */
/*! HTML5 Boilerplate v9.0.0 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
Expand Down
8 changes: 4 additions & 4 deletions dist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
},
"devDependencies": {
"copy-webpack-plugin": "^11.0.0",
"html-webpack-plugin": "^5.5.3",
"webpack": "^5.88.2",
"html-webpack-plugin": "^5.6.0",
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
"webpack-dev-server": "^5.0.4",
"webpack-merge": "^5.10.0"
}
}
2 changes: 2 additions & 0 deletions gulpfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ gulp.task('copy:misc', () =>
// (other tasks will handle the copying of these files)
`!${dirs.src}/css/main.css`,
`!${dirs.src}/index.html`,
`!**/.DS_Store`
],
{
encoding: false,
// Include hidden files by default
dot: true,
},
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion test/file_existence.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 674a723

Please sign in to comment.