Ios - Setup CI #19
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: Android Main CI | ||
on: | ||
pull_request: | ||
branches: | ||
- 'main' | ||
push: | ||
branches: | ||
- 'main' | ||
jobs: | ||
detekt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'adopt' | ||
java-version: 17 | ||
- name: Run Detekt | ||
run: ./gradlew detekt | ||
- name: Run Lint | ||
run: ./gradlew lint | ||
unit-tests: | ||
name: Run Unit Tests with coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'adopt' | ||
java-version: 17 | ||
- name: Run Release Unit Tests | ||
run: bash ./gradlew koverMergedReport | ||
- name: Upload coverage report | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage-report | ||
path: build/reports/kover/merged/html/index.html | ||
Android: | ||
name: Android Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'adopt' | ||
java-version: 17 | ||
- name: Build app | ||
run: bash ./gradlew assemble | ||
- name: Upload Release APK | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: apk | ||
path: ./android/app/build/outputs/apk/release/app-release.apk | ||
- name: Upload mapping file | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: mapping | ||
path: ./android/app/build/outputs/mapping/release/mapping.txt | ||
iOS: | ||
name: iOS Build | ||
runs-on: macOS-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'adopt' | ||
java-version: 17 | ||
- name: Install cocoapods | ||
run: gem install cocoapods | ||
- name: Install dependencies | ||
run: pod install | ||
working-directory: ./CryptoAppiOS | ||
- name: Build | ||
working-directory: ./CryptoAppiOS | ||
run: | | ||
xcodebuild -scheme CryptoAppiOS -workspace ./CryptoAppiOS/CryptoAppiOS.xcworkspace \ | ||
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO \ | ||
-destination 'platform=iOS Simulator,name=iPhone 14,OS=16.1' \ | ||
-derivedDataPath \ | ||
build | ||
- name: Upload iOS APP | ||
uses: actions/upload-artifact@v3 | ||
working-directory: ./CryptoAppiOS | ||
with: | ||
name: ios_app | ||
path: ./build/Build/Products/Debug-iphoneos/CryptoAppiOS.app |