Merge pull request #548 from mindbox-cloud/hotfix/rustore_crash_api_22 #58
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: Lint + UnitTests + Build | |
on: | |
push: | |
branches: | |
- '**' | |
- '!master' | |
paths-ignore: | |
- '**.md' | |
tags-ignore: | |
- '**' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v2 | |
- name: Get changed Kotlin files | |
id: get_changed_files | |
run: | | |
CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E '\.kt$|\.kts$' || true) | |
echo "Changed Kotlin files:" | |
echo "$CHANGED_FILES" | |
echo "CHANGED_FILES<<EOF" >> $GITHUB_OUTPUT | |
echo "$CHANGED_FILES" >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
- name: Run ktlintCheck on changed files | |
if: steps.get_changed_files.outputs.CHANGED_FILES != '' | |
run: ./gradlew ktlintCheck -PinternalKtlintGitFilter="${{ steps.get_changed_files.outputs.CHANGED_FILES }}" | |
- name: lint check | |
run: ./gradlew --no-daemon lintDebug | |
unit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v2 | |
- name: unit tests | |
run: ./gradlew --no-daemon --stacktrace testDebugUnitTest | |
- name: test report | |
uses: asadmansr/[email protected] | |
if: ${{ always() }} | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: build project | |
run: ./gradlew --no-daemon assembleDebug |