Merge pull request #520 from nimblehq/feature/kmm-support-refactor-al… #1230
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Detekt and unit tests | |
on: push | |
jobs: | |
run_detekt_and_unit_tests: | |
name: Run Detekt and unit tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout source code | |
uses: actions/[email protected] | |
- name: Cache Gradle | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches/modules-* | |
~/.gradle/caches/jars-* | |
~/.gradle/caches/build-cache-* | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
# template-compose | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Run Detekt on template-compose | |
working-directory: ./template-compose | |
run: ./gradlew detekt | |
- name: Archive Detekt reports on template-compose | |
uses: actions/upload-artifact@v3 | |
with: | |
name: DetektReportsTemplateCompose | |
path: template-compose/build/reports/detekt/ | |
- name: Run unit tests with Kover on template-compose | |
working-directory: ./template-compose | |
run: ./gradlew koverHtmlReport | |
- name: Archive code coverage reports on template-compose | |
uses: actions/upload-artifact@v3 | |
with: | |
name: CodeCoverageReportsTemplateCompose | |
path: template-compose/app/build/reports/kover/ | |
# template-xml | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- name: Run Detekt on template-xml | |
working-directory: ./template-xml | |
run: ./gradlew detekt | |
- name: Archive Detekt reports on template-xml | |
uses: actions/upload-artifact@v3 | |
with: | |
name: DetektReportsTemplateXML | |
path: template-xml/build/reports/detekt/ | |
- name: Run unit tests with Kover on template-xml | |
working-directory: ./template-xml | |
run: ./gradlew koverHtmlReport | |
- name: Archive code coverage reports on template-xml | |
uses: actions/upload-artifact@v3 | |
with: | |
name: CodeCoverageReportsTemplateXML | |
path: template-xml/app/build/reports/kover/ | |
# sample-xml | |
- name: Run Detekt on sample-xml | |
working-directory: ./sample-xml | |
run: ./gradlew detekt | |
- name: Archive Detekt reports on sample-xml | |
uses: actions/upload-artifact@v3 | |
with: | |
name: DetektReportsTemplateXML | |
path: sample-xml/build/reports/detekt/ | |
- name: Run unit tests with Kover on sample-xml | |
working-directory: ./sample-xml | |
run: ./gradlew koverHtmlReport | |
- name: Archive code coverage reports on sample-xml | |
uses: actions/upload-artifact@v3 | |
with: | |
name: CodeCoverageReportsTemplateXML | |
path: sample-xml/app/build/reports/kover/ | |
# sample-compose | |
- name: Run Detekt on sample-compose | |
working-directory: ./sample-compose | |
run: ./gradlew detekt | |
- name: Archive Detekt reports on sample-compose | |
uses: actions/upload-artifact@v3 | |
with: | |
name: DetektReportsTemplateCompose | |
path: sample-compose/build/reports/detekt/ | |
- name: Run unit tests with Kover on sample-compose | |
working-directory: ./sample-compose | |
run: ./gradlew koverHtmlReport | |
- name: Archive code coverage reports on sample-compose | |
uses: actions/upload-artifact@v3 | |
with: | |
name: CodeCoverageReportsTemplateCompose | |
path: sample-compose/app/build/reports/kover/ |