Skip to content

Merge pull request #54 from keiji/dependabot/gradle/org.jetbrains.kot… #143

Merge pull request #54 from keiji/dependabot/gradle/org.jetbrains.kot…

Merge pull request #54 from keiji/dependabot/gradle/org.jetbrains.kot… #143

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
detekt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup reviewdog
uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Detekt
run: ./gradlew detekt
- name: reviewdog report
if: failure()
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: cat ./build/reports/detekt/detekt.xml |
reviewdog -f=checkstyle -name="detekt" -reporter="github-pr-review"
build:
needs: detekt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build
run: ./gradlew assemble
- name: Execute Unit-tests
run: ./gradlew test