Skip to content

Setup detekt

Setup detekt #44

Workflow file for this run

name: Android CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: app
path: app/build/outputs/apk/
test:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Set up JDK 17
uses: actions/[email protected]
with:
distribution: 'adopt'
java-version: '17'
- name: Grant execute permissions for gradlew
run: chmod +x ./gradlew
- name: Run Tests with Gradle
run: ./gradlew test
detekt:
name: Run detekt
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v2
with:
fetch-depth: 1
ref: ${{ github.head_ref }}
- name: detekt
uses: alaegin/[email protected]
with:
reviewdog_reporter: github-pr-review
github_token: ${{ secrets.github_token }}
detekt_config: config/detekt-config.yml
dokka:
runs-on: ubuntu-latest
needs: [ build, test ]
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Set up JDK 17
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: '17'
cache: gradle
- name: Grant execute permissions for gradlew
run: chmod +x ./gradlew
- name: Run Dokka with Gradle
run: ./gradlew dokkaHtmlMultiModule
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: build/dokka/htmlMultiModule