-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce a workflow for linting and building.
- Loading branch information
Showing
4 changed files
with
52 additions
and
25 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,14 @@ | ||
name: "Clone code and set up Java" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "Clone code" | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: "Set up Adopt OpenJDK 17" | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: adopt | ||
java-version: 17 |
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,11 @@ | ||
name: "Lint code" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "Clone code and set up Java" | ||
uses: ./.github/actions/clone | ||
- name: "Detekt" | ||
run: sh gradlew detekt | ||
- name: "KtLint" | ||
run: sh gradlew ktlintCheck |
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: "Lint and build code" | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
- "!main" | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Lint code" | ||
uses: ./.github/actions/lint | ||
|
||
build: | ||
needs: lint | ||
runs-on: macos-latest | ||
steps: | ||
- name: "Validate Gradle wrapper" | ||
uses: gradle/wrapper-validation-action@v1 |
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