Skip to content

Commit

Permalink
build(ci): split out gradle wrapper validation
Browse files Browse the repository at this point in the history
  • Loading branch information
skaldarnar committed Sep 3, 2023
1 parent cf0d2ae commit 366b90f
Showing 1 changed file with 12 additions and 22 deletions.
34 changes: 12 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Java CI
on: [push]

jobs:
build:
validate-gradle-wrapper:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -16,56 +16,46 @@ jobs:
uses: gradle/wrapper-validation-action@v1
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
build:
runs-on: ubuntu-latest
needs: validate-gradle-wrapper
steps:
- uses: actions/checkout@v3
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build Distribution for Launcher
run: ./gradlew extractConfig extractNatives distForLauncher testDist
- name: Unit Tests
run: ./gradlew unitTest
run: ./gradlew -PacceptGradleBuildScanTermsOfService=yes unitTest --scan
- name: API Documentation
run: ./gradlew javadoc
- name: Publish
run: echo "TODO"
integration-test:
runs-on: ubuntu-latest
needs: validate-gradle-wrapper
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Integration Tests
run: ./gradlew integrationTest
run: ./gradlew -PacceptGradleBuildScanTermsOfService=yes integrationTest --scan
code-analysis:
runs-on: ubuntu-latest
needs: validate-gradle-wrapper
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Static Code Analysis
run: ./gradlew check -x test
build-with-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build With Gradlew
run: ./gradlew -PacceptGradleBuildScanTermsOfService=yes distForLauncher --scan

0 comments on commit 366b90f

Please sign in to comment.