fix(setup): fix setupFromCache, remove params validation from command… #318
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: On Commit | |
on: | |
push: | |
branches: [ master ] | |
workflow_dispatch: | |
env: | |
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }} | |
SLACK_ICON: https://icons.iconarchive.com/icons/martz90/circle/256/android-icon.png | |
SLACK_TITLE: Commit status | |
SLACK_USERNAME: Emarsys SDK - Flutter | |
SLACK_WEBHOOK: ${{ secrets.SLACK_MOBILE_TEAM_CI_CHANNEL_WEBHOOK }} | |
jobs: | |
Android: | |
needs: [Lint] | |
runs-on: macos-12 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Setup flutter env | |
uses: subosito/[email protected] | |
with: | |
flutter-version: "3.16.7" | |
architecture: x64 | |
channel: "stable" | |
- name: Update dependencies | |
run: flutter pub get | |
- name: Install Google Services JSON | |
uses: davidSchuppa/base64Secret-toFile-action@v1 | |
with: | |
secret: ${{ secrets.GOOGLE_SERVICE_JSON_BASE64 }} | |
filename: google-services.json | |
destination-path: ./example/android/app/ | |
- name: Run Android unit tests with gradle | |
run: (cd example/android && ./gradlew clean build test -x lint) | |
IOS: | |
runs-on: macos-12 | |
needs: [Lint] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup flutter env | |
uses: subosito/[email protected] | |
with: | |
flutter-version: "3.16.7" | |
architecture: x64 | |
channel: "stable" | |
- name: Open simulator | |
run: open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/ | |
- name: Update dependencies | |
run: flutter pub get | |
- name: Remove old directories | |
run: rm -rf ~/tmp | rm -rf ~/Library/MobileDevice | |
shell: bash | |
- name: Install Dependencies | |
run: (cd example/ios && pod install --no-repo-update --verbose) | |
shell: bash | |
- name: Run Flutter Tests | |
run: flutter test | |
- name: Run iOS unit tests | |
run: xcodebuild -workspace ~/work/flutter-plugin-for-sap-emarsys-customer-engagement/flutter-plugin-for-sap-emarsys-customer-engagement/example/ios/Runner.xcworkspace -scheme RunnerTests -configuration Debug -destination 'platform=iOS Simulator,name=iPhone 13 Pro Max,OS=16.2' test | |
Lint: | |
runs-on: macos-12 | |
steps: | |
- name: Setup flutter env | |
uses: subosito/[email protected] | |
with: | |
flutter-version: "3.16.7" | |
architecture: x64 | |
channel: "stable" | |
- name: Flutter lint | |
run: dart analyze | |
shell: bash |