This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/tsfile.git


The following commit(s) were added to refs/heads/develop by this push:
     new 7dec8c28 chore: Try to force github actions to check out code with 
linux line breaks on windows machines
7dec8c28 is described below

commit 7dec8c285982576a0420d81679932d4d8bef7cd2
Author: Christofer Dutz <[email protected]>
AuthorDate: Fri Jan 5 12:09:17 2024 +0100

    chore: Try to force github actions to check out code with linux line breaks 
on windows machines
---
 .github/workflows/unit-test.yml | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml
index ffe44da3..5a4fc571 100644
--- a/.github/workflows/unit-test.yml
+++ b/.github/workflows/unit-test.yml
@@ -34,6 +34,13 @@ jobs:
     runs-on: ${{ matrix.os }}
 
     steps:
+      - name: Configure unix line breaks on Windows machines
+        if: ${{ matrix.os == 'windows-latest'}}
+        shell: bash
+        run: |
+          git config --system core.autocrlf false
+          git config --system core.eol lf
+
       - name: Checkout repository
         uses: actions/checkout@v4
 
@@ -43,7 +50,7 @@ jobs:
           distribution: corretto
           java-version: ${{ matrix.java }}
 
-      # Setup caching of the artifacts in the .m2 directory so they don't have 
to
+      # Setup caching of the artifacts in the .m2 directory, so they don't 
have to
       # all be downloaded again for every build.
       - name: Cache Maven packages
         uses: actions/cache@v3
@@ -67,6 +74,13 @@ jobs:
               core.setOutput('platform_suffix', ``)
             }
 
-      - name: Build and test with Maven
+      # Spotless doesn't work on Windows due to the different line endings.
+      #- name: Build and test with Maven (Windows)
+      #  if: ${{ matrix.os == 'windows-latest'}}
+      #  shell: bash
+      #  run: ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} clean 
verify -Pspotless.skip=true
+
+      - name: Build and test with Maven (All others)
         shell: bash
+        #if: ${{ matrix.os != 'windows-latest'}}
         run: ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} clean 
verify

Reply via email to