From 9914b9dc7bf5d00ffa1516c8ad3db6cf48627d02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Mon, 2 Nov 2020 08:14:20 +0100 Subject: [PATCH] chore: fix tests on Windows and enable it in actions Use a gitattributes file to force text files to be checked out with LF line endings. This resolves issues on Windows with tests that compare values with the contents of files on disk. --- .gitattributes | 2 ++ .github/workflows/nodejs.yml | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..701564e3 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Force checking out with LF on Windows to avoid issues in tests that read files. +* text=auto eol=lf diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index d66ef49e..7eae252f 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -27,8 +27,7 @@ jobs: fail-fast: false matrix: node-version: [10.x, 12.x, 14.x] - # TODO(targos): fix and add windows-latest - os: [ubuntu-latest, macOS-latest] + os: [ubuntu-latest, macOS-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2