Skip to content

Commit

Permalink
chore[sdds-android, cicd]: Project build system migration to composit…
Browse files Browse the repository at this point in the history
…e builds was made to support multiproject structure. Code quality check workflow was created. Merge reports tasks were added.
  • Loading branch information
malilex committed Feb 26, 2024
1 parent 07d6201 commit f8bc1be
Show file tree
Hide file tree
Showing 70 changed files with 2,353 additions and 284 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/android-lint-test-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: 'Code Quality Check'

on:
pull_request:
paths:
- ./native/sdds-android/**
push:
paths:
- ./native/sdds-android/**

jobs:
lint:
name: Perform static analysis
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2

- name: Cache Gradle
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle-

- name: Make Gradle executable
run: chmod +x ./gradlew

- name: Run lint
run: ./gradlew lintDebugAll

- name: Run detekt
run: ./gradlew detektAll

- name: Run spotless
run: ./gradlew spotlessCheckAll

- name: Merge reports
if: success() || failure()
run: ./gradlew mergeReports

- name: Upload html test report
if: success() || failure()
uses: actions/upload-artifact@v2
with:
name: static_analysis
path: build/reports/

unit-test:
name: Perform Unit Testing
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2

- name: Run tests
run: ./gradlew test

- name: Merge test reports
if: success() || failure()
run: ./gradlew copyTestsReports

- name: Upload test report
if: success() || failure()
uses: actions.upload-artifact@v2
with:
name: test_reports
path: build/reports/test/

Loading

0 comments on commit f8bc1be

Please sign in to comment.