mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-23 09:30:50 +03:00
44797fc2dc
Change-Id: I47dbe78febc16601fcd4e43ca4187d7735f709a8
77 lines
2.2 KiB
YAML
77 lines
2.2 KiB
YAML
name: Code Quality Checks
|
|
|
|
on:
|
|
pull_request: { }
|
|
push:
|
|
branches: [ main, develop ]
|
|
|
|
jobs:
|
|
check:
|
|
name: Project Check Suite
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Run code quality check suite
|
|
run: ./tools/check/check_code_quality.sh
|
|
|
|
klint:
|
|
name: Kotlin Linter
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Run klint
|
|
run: |
|
|
curl -sSLO https://github.com/pinterest/ktlint/releases/download/0.36.0/ktlint && chmod a+x ktlint
|
|
./ktlint --android --experimental -v
|
|
|
|
# Lint for main module and all the other modules
|
|
android-lint:
|
|
name: Android Linter
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-
|
|
- name: Lint analysis
|
|
run: ./gradlew clean :vector:lint --stacktrace
|
|
- name: Upload reports
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: lint-report
|
|
path: |
|
|
vector/build/reports/*.*
|
|
|
|
# Lint for Gplay and Fdroid release APK
|
|
apk-lint:
|
|
name: Lint APK (${{ matrix.target }})
|
|
runs-on: ubuntu-latest
|
|
if: github.ref != 'refs/heads/main'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
target: [ Gplay, Fdroid ]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-
|
|
- name: Lint ${{ matrix.target }} release
|
|
run: ./gradlew clean lint${{ matrix.target }}Release --stacktrace
|
|
- name: Upload ${{ matrix.target }} linting report
|
|
uses: actions/upload-artifact@v2
|
|
if: always()
|
|
with:
|
|
name: release-lint-report-${{ matrix.target }}
|
|
path: |
|
|
vector/build/reports/*.*
|