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 report tasks were added. Codeowners file was modified.
  • Loading branch information
malilex committed Feb 27, 2024
1 parent a5d07a6 commit 7d748d5
Show file tree
Hide file tree
Showing 68 changed files with 2,285 additions and 292 deletions.
20 changes: 20 additions & 0 deletions .github/actions/prepare-android-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'Prepare Android environment'

description: 'Setup gradle with cache'

runs:
using: "composite"
steps:
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.m2/repository
./.gradle
~/.gradle/cache
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
restore-keys: ${{ runner.os }}-gradle-

- name: Make Gradle executable
shell: bash
run: chmod +x ./native/sdds-android/gradlew
74 changes: 74 additions & 0 deletions .github/workflows/android-code-quality-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: 'Code Quality Check'

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

concurrency:
# New commit on branch cancels running workflows of the same branch
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true


defaults:
run:
working-directory: ./native/sdds-android

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

- name: Prepare environment
uses: ./.github/actions/prepare-android-env

- 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 static analysis reports
if: success() || failure()
uses: actions/upload-artifact@v2
with:
name: static_analysis
path: native/sdds-android/build/reports/

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

- name: Prepare environment
uses: ./.github/actions/prepare-android-env

- name: Run tests
run: ./gradlew test

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

- name: Upload test reports
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: test-reports.zip
path: native/sdds-android/build/reports/test-reports.zip
4 changes: 4 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
* @Yeti-or @neretin-trike @Yakutoc @kayman233

native/* @malilex @Yeti-or

.github/* @Yakutoc @Yeti-or @malilex
6 changes: 2 additions & 4 deletions native/sdds-android/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
Проект объединяет в себе набор решений по адаптации дизайн-системы SDDS для приложений Android.

## Состав
- [Theme Builder Plugin](./plugin_theme_builder/README.MD)
- [SDDS Sandbox App](./sandbox/README.MD)
- [SDDS UIKit](./uikit/README.MD)
- [SDDS Compose UIKit](./uikit-compose/README.MD)
- [build-system](./build-system/README.MD)
- [SDDS Core](./sdds-core/README.MD)
Loading

0 comments on commit 7d748d5

Please sign in to comment.