Incorporate open source template changes #16
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- develop | |
- main | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
validation: | |
name: Validation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout latest code | |
uses: actions/[email protected] | |
- name: Validate Gradle Wrapper | |
uses: gradle/[email protected] | |
lint: | |
name: Lint | |
needs: [ validation ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Save Gradle Caches | |
uses: actions/[email protected] | |
with: | |
path: ~/.gradle/caches/ | |
key: gradle-caches-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
gradle-caches-${{ runner.os }}- | |
- name: Lint | |
run: ./gradlew lint | |
- name: Stop Gradle | |
run: ./gradlew --stop | |
detekt: | |
name: Detekt | |
needs: [ validation ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Save Gradle Caches | |
uses: actions/[email protected] | |
with: | |
path: ~/.gradle/caches/ | |
key: gradle-caches-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
gradle-caches-${{ runner.os }}- | |
- name: Detekt | |
run: ./gradlew detektAll | |
- name: Stop Gradle | |
run: ./gradlew --stop | |
ktlint: | |
name: ktlint | |
needs: [ validation ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Save Gradle Caches | |
uses: actions/[email protected] | |
with: | |
path: ~/.gradle/caches/ | |
key: gradle-caches-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
gradle-caches-${{ runner.os }}- | |
- name: ktlint | |
run: ./gradlew ktlintAll | |
- name: Stop Gradle | |
run: ./gradlew --stop | |
cpd: | |
name: CPD | |
needs: [ validation ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Save Gradle Caches | |
uses: actions/[email protected] | |
with: | |
path: ~/.gradle/caches/ | |
key: gradle-caches-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
gradle-caches-${{ runner.os }}- | |
- name: CPD | |
run: ./gradlew cpdAll | |
- name: Stop Gradle | |
run: ./gradlew --stop | |
tests: | |
name: Tests | |
needs: [ validation, lint, detekt, ktlint, cpd ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Save Gradle Caches | |
uses: actions/[email protected] | |
with: | |
path: ~/.gradle/caches/ | |
key: gradle-caches-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
gradle-caches-${{ runner.os }}- | |
- name: Unit tests | |
run: ./gradlew clean testDebugUnitTest | |
- name: Stop Gradle | |
run: ./gradlew --stop |