-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8cb49e4
commit 42c7746
Showing
6 changed files
with
115 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: "detekt-validation" | ||
on: | ||
workflow_call: | ||
jobs: | ||
build: | ||
name: Build project with gradle | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
target: [ "fabric", "forge", "velocity", "plugin" ] | ||
steps: | ||
- name: Checkout Git repo | ||
uses: actions/checkout@v4 | ||
- name: Set up JDK 1.21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '21' | ||
- name: Give gradle permission | ||
run: chmod +x gradlew | ||
- name: Build with Gradle | ||
uses: gradle/gradle-build-action@v3 | ||
with: | ||
arguments: ${{ matrix.target }}:build --stacktrace |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: "detekt-validation" | ||
on: | ||
workflow_call: | ||
jobs: | ||
detekt: | ||
name: "Check project by detekt" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 1.21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '21' | ||
- name: Give gradle permission | ||
run: chmod +x gradlew | ||
- name: detekt | ||
uses: gradle/gradle-build-action@v3 | ||
with: | ||
arguments: detekt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: "gradle-wrapper-validation" | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
validation: | ||
name: "Gradle Wrapper Validation" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v3 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Pull request | ||
on: | ||
pull_request: | ||
branches: | ||
- 'develop' | ||
- 'master' | ||
- 'prerelease/*' | ||
|
||
# Concurrency strategy: | ||
# github.workflow: distinguish this workflow from others | ||
# github.event_name: distinguish `push` event from `pull_request` event | ||
# github.ref_name: distinguish branch | ||
# github.repository: distinguish owner+repository | ||
# | ||
# Reference: | ||
# https://docs.github.com/en/actions/using-jobs/using-concurrency | ||
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event_name }}-${{github.ref_name}}-${{github.repository}} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
gradle_validation: | ||
name: Validate gradle wrapper | ||
uses: ./.github/workflows/gradle-wrapper-validation.yml | ||
detekt_validation: | ||
name: Check by detekt | ||
needs: gradle_validation | ||
uses: ./.github/workflows/detekt-validation.yml | ||
tests_validation: | ||
needs: gradle_validation | ||
uses: ./.github/workflows/tests-validation.yml | ||
build: | ||
name: Build project | ||
needs: [ gradle_validation, detekt_validation, tests_validation ] | ||
uses: ./.github/workflows/build-project.yml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: "tests" | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
tests: | ||
name: "Run tests" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 1.21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '21' | ||
- name: Give gradle permission | ||
run: chmod +x gradlew | ||
- name: Run tests | ||
uses: gradle/gradle-build-action@v3 | ||
with: | ||
arguments: test |
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