build(ci): use common repo setup action #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI | |
on: [push] | |
jobs: | |
validate-gradle-wrapper: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
build: | |
runs-on: ubuntu-latest | |
needs: validate-gradle-wrapper | |
steps: | |
- uses: ./.github/actions/setup-terasology-repo | |
- name: Build Distribution for Launcher | |
run: ./gradlew extractConfig extractNatives distForLauncher testDist | |
- name: Unit Tests | |
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: ./.github/actions/setup-terasology-repo | |
- name: Integration Tests | |
run: ./gradlew -PacceptGradleBuildScanTermsOfService=yes integrationTest --scan | |
code-analysis: | |
name: Static Code Analysis | |
runs-on: ubuntu-latest | |
needs: validate-gradle-wrapper | |
steps: | |
- uses: ./.github/actions/setup-terasology-repo | |
- name: Checkstyle | |
run: ./gradlew checkstyleMain checkstyleTest | |
- name: Spotbugs | |
run: ./gradlew spotbugsMain spotbugsTest | |
- name: PMD | |
run: ./gradlew pmdMain pmdTest |