Skip to content

Commit

Permalink
Make sure code is checked out in CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
airxnoor committed May 8, 2024
1 parent 5852d0a commit fbea60f
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 18 deletions.
14 changes: 0 additions & 14 deletions .github/actions/clone/action.yml

This file was deleted.

9 changes: 9 additions & 0 deletions .github/actions/java/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: "Set up Adopt OpenJDK 17"

runs:
using: "composite"
steps:
- uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17
8 changes: 4 additions & 4 deletions .github/actions/lint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: "Lint code"
runs:
using: "composite"
steps:
- name: "Clone code and set up Java"
uses: ./.github/actions/clone
- name: "Detekt"
- name: "Set up Adopt OpenJDK 17"
uses: ./.github/actions/java
- name: "Run Detekt"
run: sh gradlew detekt
- name: "KtLint"
- name: "Run KtLint"
run: sh gradlew ktlintCheck
10 changes: 10 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,22 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: "Clone code"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Lint code"
uses: ./.github/actions/lint

build:
needs: lint
runs-on: macos-latest
steps:
- name: "Clone code"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Set up Adopt OpenJDK 17"
uses: ./.github/actions/java
- name: "Validate Gradle wrapper"
uses: gradle/wrapper-validation-action@v1
10 changes: 10 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,23 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: "Clone code"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Lint code"
uses: ./.github/actions/lint

build:
needs: lint
runs-on: macos-latest
steps:
- name: "Clone code"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Set up Adopt OpenJDK 17"
uses: ./.github/actions/java
- name: "Validate Gradle wrapper"
uses: gradle/wrapper-validation-action@v1

Expand Down

0 comments on commit fbea60f

Please sign in to comment.