MOEN-31868: Ktlint and CI Setup #3
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: Verify Pull Request | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: [ opened, reopened, ready_for_review, synchronize ] | |
branches: [ "development", "master" ] | |
jobs: | |
assemble-verification: | |
runs-on: ubuntu-latest | |
if: ${{ !github.event.pull_request.draft }} | |
strategy: | |
fail-fast: true | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up repository | |
run: | | |
echo segmentWriteKey="Dummy Segment Key" >> ./local.properties | |
echo moengageAppId="Dummy MoEngage Key" >> ./local.properties | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Set up gradle cache | |
uses: gradle/gradle-build-action@v2 | |
- name: Build project | |
run: ./gradlew assemble | |
- name: Ktlint check | |
run: ./gradlew ktlintcheck |