Merge pull request #1123 from ing-bank/ci/node-windows

chore: update verify workflow to run node tests on windows
This commit is contained in:
Joren Broekema 2020-12-08 10:03:11 +01:00 committed by GitHub
commit ba3a0dffa8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
'providence-analytics': patch
---
Relative source path util take posix path for both full path and root path, to ensure the replace happens properly.

View file

@ -68,10 +68,11 @@ jobs:
node-tests:
name: Node tests
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [12.x, 14.x]
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2

View file

@ -20,7 +20,7 @@ function isRelativeSourcePath(source) {
* @param {string} rootPath like '/path/to/repo'
*/
function toRelativeSourcePath(fullPath, rootPath) {
return toPosixPath(fullPath).replace(rootPath, '.');
return toPosixPath(fullPath).replace(toPosixPath(rootPath), '.');
}
module.exports = { isRelativeSourcePath, toRelativeSourcePath };