Skip to content

Commit

Permalink
Merge pull request #8 from formigas/codemagic-ci-changes-155
Browse files Browse the repository at this point in the history
Automated PR for Codemagic CI brick changes
  • Loading branch information
formigas-flik[bot] authored Sep 20, 2024
2 parents 25e8d7e + 4f01098 commit 86bac45
Showing 1 changed file with 56 additions and 26 deletions.
82 changes: 56 additions & 26 deletions codemagic.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
workflows:
definitions:
name: Continuous Integration
environment:
flutter: stable
xcode: latest
triggering:
events:
- pull_request
- push
cancel_previous_builds: true
scripts:
- &prepare_flutter_script
name: Get Flutter dependencies
script: |
flutter clean
flutter pub get
cache:
cache_paths:
- $HOME/.pub-cache
- $HOME/.gradle/caches
- $HOME/Library/Caches/CocoaPods
definitions:
environment: &environment
flutter: stable
xcode: latest
triggering: &triggering
events:
- pull_request
- push
cancel_previous_builds: true
cache: &cache
cache_paths:
- $HOME/.pub-cache
- $HOME/.gradle/caches
- $HOME/Library/Caches/CocoaPods
scripts:
- &prepare_flutter_script
name: Get Flutter dependencies
script: |
flutter clean
flutter pub get
workflows:
validate:
name: Validate
max_build_duration: 10
instance_type: linux_x2
environment:
<<: *environment
triggering:
<<: *triggering
cache:
<<: *cache
scripts:
- *prepare_flutter_script
- name: Format
Expand All @@ -36,6 +41,12 @@ workflows:
name: Build iOS
max_build_duration: 30
instance_type: mac_mini_m2
environment:
<<: *environment
triggering:
<<: *triggering
cache:
<<: *cache
scripts:
- *prepare_flutter_script
- name: Build iOS
Expand All @@ -44,25 +55,44 @@ workflows:
build-android:
name: Build Android
max_build_duration: 30
instance_type: linux_x2
environment:
<<: *environment
android_signing:
- android_keystore
instance_type: linux_x2
- codemagic_ci_testapp_android_keystore
triggering:
<<: *triggering
cache:
<<: *cache
scripts:
- *prepare_flutter_script
- name: Set up key.properties
script: |
cat >> "$CM_BUILD_DIR/android/key.properties" <<EOF
storePassword=$CM_KEYSTORE_PASSWORD
keyPassword=$CM_KEY_PASSWORD
keyAlias=$CM_KEY_ALIAS
storeFile=$CM_KEYSTORE_PATH
EOF
- name: Build Android
script: flutter build appbundle --release --flavor production -t lib/main_production.dart

test:
name: Test and generate coverage
max_build_duration: 30
instance_type: linux_x2
environment:
<<: *environment
triggering:
<<: *triggering
cache:
<<: *cache
scripts:
- *prepare_flutter_script
- name: Install lcov and genhtml
- name: Install lcov
script: |
sudo apt-get update
sudo apt-get -y install lcov genhtml
sudo apt-get -y install lcov
- name: Run tests
script: flutter test --coverage --file-reporter json:test_results.json
- name: Generate coverage report
Expand Down

0 comments on commit 86bac45

Please sign in to comment.