Skip to content

Commit

Permalink
Require the format check to run before running the tests.
Browse files Browse the repository at this point in the history
Signed-off-by: James R. Perkins <[email protected]>
  • Loading branch information
jamezp committed Nov 9, 2023
1 parent 6768d0b commit f2770c0
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,25 @@ on:
- '**'

jobs:
build:
format-check:
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
cache: 'maven'
- name: Validate Formatting
run: |
mvn -B validate formatter:validate -Denforcer.skip=true
mvn -B validate impsort:check -Denforcer.skip=true
build:
runs-on: ${{ matrix.os }}
needs: format-check
timeout-minutes: 90
strategy:
fail-fast: false
Expand All @@ -34,20 +50,3 @@ jobs:
cache: 'maven'
- name: Build with Maven - ${{ matrix.os }} - JDK ${{ matrix.java }}
run: mvn -B clean install

format-check:
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
cache: 'maven'
- name: Validate Formatting
run: |
mvn -B validate formatter:validate -Denforcer.skip=true
mvn -B validate impsort:check -Denforcer.skip=true

0 comments on commit f2770c0

Please sign in to comment.