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.
  • Loading branch information
malilex committed Feb 26, 2024
1 parent 07d6201 commit 7f4a753
Show file tree
Hide file tree
Showing 70 changed files with 2,363 additions and 284 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/android-lint-test-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
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@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 7f4a753

Please sign in to comment.