Skip to content

chore[sdds-android, cicd]: Project build system migration to composit… #1

chore[sdds-android, cicd]: Project build system migration to composit…

chore[sdds-android, cicd]: Project build system migration to composit… #1

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/