From 665d2dac0e3cf4c670d910ced002b542b4672ad5 Mon Sep 17 00:00:00 2001 From: Cedric Willekens Date: Fri, 24 May 2024 14:05:53 +0200 Subject: [PATCH 1/2] Fix gha smells: - Use fixed version for runs-on argument - Run tests on multiple OS's - Avoid workflows without comments --- .github/workflows/ci.yml | 5 ++++- .github/workflows/document-lint.yml | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ddd4ecd7d2..f995ea129e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,10 +12,13 @@ on: jobs: build: - runs-on: ubuntu-latest + name: Build on ${{matrix.os}} with Java ${{matrix.java}} + runs-on: ${{matrix.os}} strategy: + fail-fast: false matrix: java: [8, 11, 17, 21] + os: [ubuntu-latest, windows-latest] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/document-lint.yml b/.github/workflows/document-lint.yml index 27e921f302..6c0696c0f8 100644 --- a/.github/workflows/document-lint.yml +++ b/.github/workflows/document-lint.yml @@ -17,8 +17,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - run: npm install -g markdownlint-cli - + - run: npm install -g markdownlint-cli@0.40.0 + # Run markdown lint with the following rules disabled: + # no hard tabs, line length, no duplicate heading, ordered list item prefix, no inline html and no emphasis as heading - name: use markdownlint-cli to lint markdown file run: | find ./ -name "*.md" | grep -v vendor | grep -v commandline | grep -v .github | grep -v swagger | grep -v api | \ From 4128538ec8d11530317c53deca0a0e52faab55a1 Mon Sep 17 00:00:00 2001 From: Cedric Willekens Date: Tue, 28 May 2024 17:03:02 +0200 Subject: [PATCH 2/2] Put lifecycle phase at end of mvn command to test for windows --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f995ea129e..25396020a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,15 +39,15 @@ jobs: distribution: 'temurin' - name: Maven Test With Spring 6.x - run: mvn --batch-mode test -Dsurefire.jdk-toolchain-version=${{ matrix.java }} + run: mvn test --batch-mode "-Dsurefire.jdk-toolchain-version=${{ matrix.java }}" if: ${{ matrix.java >= 17 }} - name: Maven Test Without Spring 6.x - run: mvn --batch-mode test -Dsurefire.jdk-toolchain-version=${{ matrix.java }} -Dskip.spring.v6x.test=true + run: mvn test --batch-mode "-Dsurefire.jdk-toolchain-version=${{ matrix.java }}" "-Dskip.spring.v6x.test=true" if: ${{ matrix.java < 17 }} - name: Build with Maven - run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -DminimumPriority=1 + run: mvn install "-DskipTests=true" "-Dmaven.javadoc.skip=true" -B -V "-DminimumPriority=1" - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4.0.1