Skip to content

Commit 64cd667

Browse files
committed
Fix path handling under windows
Let the unit tests run under macos and windows additionally.
1 parent f67f542 commit 64cd667

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,16 @@ on:
1212
jobs:
1313
# unit tests
1414
unit:
15-
runs-on: ubuntu-latest
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ ubuntu-latest, windows-latest, macos-latest ]
19+
fail-fast: false
1620
steps:
1721
- uses: actions/checkout@v2
22+
- name: Set Node.js 12.x
23+
uses: actions/[email protected]
24+
with:
25+
node-version: 12.x
1826
- run: npm ci
1927
- run: npm test

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ const determineModifiedFiles = async function(token, sourcePath) {
126126
}
127127
const filenames = allFiles.data
128128
.filter(f => f.status === 'added' || f.status === 'changed' || f.status === 'modified')
129-
.map(f => f.filename)
129+
.map(f => path.normalize(f.filename))
130130
.filter(f => sourcePath === '.' || f.startsWith(sourcePath));
131131
if (core.isDebug()) {
132132
core.debug(` after filtering by status and with '${sourcePath}' ${filenames.length} files remain:`);

0 commit comments

Comments
 (0)