update ci
This commit is contained in:
+50
-22
@@ -10,7 +10,7 @@ jobs:
|
|||||||
build_and_deploy_ios:
|
build_and_deploy_ios:
|
||||||
runs-on: [macos-latest]
|
runs-on: [macos-latest]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
- name: Install RubyGems
|
- name: Install RubyGems
|
||||||
run: |
|
run: |
|
||||||
cd example/ios
|
cd example/ios
|
||||||
@@ -24,35 +24,63 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd example
|
cd example
|
||||||
flutter pub get
|
flutter pub get
|
||||||
flutter build ios --release --no-codesign
|
- name: Coverage fix
|
||||||
|
run: |
|
||||||
|
file=test/coverage_helper_test.dart
|
||||||
|
echo "// Helper file to make coverage work for all dart files\n" > $file
|
||||||
|
echo "// ignore_for_file: unused_import" >> $file
|
||||||
|
find lib -name '*.dart' | grep -e '[^g]\.dart' | grep -v '_html.dart' | cut -c4- | awk -v package=stream_chat_flutter '{printf "import '\''package:%s%s'\'';\n", package, $1}' >> $file
|
||||||
|
echo "" >> $file
|
||||||
|
echo "void main(){}" >> $file
|
||||||
|
cat $file
|
||||||
|
- name: Run tests
|
||||||
|
run: flutter test --coverage
|
||||||
|
- name: Codecov
|
||||||
|
run: bash <(curl -s https://codecov.io/bash) -c -t ${{ secrets.CODECOV_TOKEN }} -f coverage/lcov.info -F flutter_tool
|
||||||
- name: Build and release
|
- name: Build and release
|
||||||
env:
|
env:
|
||||||
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
|
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
|
||||||
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
|
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
|
||||||
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
|
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
|
cd example
|
||||||
|
flutter build ios --release --no-codesign
|
||||||
cd example/ios
|
cd example/ios
|
||||||
bundle exec fastlane deploy_to_firebase
|
bundle exec fastlane deploy_to_firebase
|
||||||
build_and_deploy_android:
|
build_and_deploy_android:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Flutter action
|
- uses: actions/setup-java@v1
|
||||||
uses: subosito/[email protected]
|
with:
|
||||||
with:
|
java-version: '12.x'
|
||||||
channel: 'stable'
|
- uses: subosito/[email protected]
|
||||||
- name: Get dependencies
|
with:
|
||||||
run: flutter pub get
|
channel: 'stable'
|
||||||
- name: Coverage fix
|
- run: |
|
||||||
run: |
|
cd example
|
||||||
file=test/coverage_helper_test.dart
|
flutter pub get
|
||||||
echo "// Helper file to make coverage work for all dart files\n" > $file
|
- name: Coverage fix
|
||||||
echo "// ignore_for_file: unused_import" >> $file
|
run: |
|
||||||
find lib -name '*.dart' | grep -e '[^g]\.dart' | grep -v '_html.dart' | cut -c4- | awk -v package=stream_chat_flutter '{printf "import '\''package:%s%s'\'';\n", package, $1}' >> $file
|
file=test/coverage_helper_test.dart
|
||||||
echo "" >> $file
|
echo "// Helper file to make coverage work for all dart files\n" > $file
|
||||||
echo "void main(){}" >> $file
|
echo "// ignore_for_file: unused_import" >> $file
|
||||||
cat $file
|
find lib -name '*.dart' | grep -e '[^g]\.dart' | grep -v '_html.dart' | cut -c4- | awk -v package=stream_chat_flutter '{printf "import '\''package:%s%s'\'';\n", package, $1}' >> $file
|
||||||
- name: Run tests
|
echo "" >> $file
|
||||||
run: flutter test --coverage
|
echo "void main(){}" >> $file
|
||||||
- name: Codecov
|
cat $file
|
||||||
run: bash <(curl -s https://codecov.io/bash) -c -t ${{ secrets.CODECOV_TOKEN }} -f coverage/lcov.info -F flutter_tool
|
- name: Run tests
|
||||||
|
run: flutter test --coverage
|
||||||
|
- name: Codecov
|
||||||
|
run: bash <(curl -s https://codecov.io/bash) -c -t ${{ secrets.CODECOV_TOKEN }} -f coverage/lcov.info -F flutter_tool
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cd example
|
||||||
|
flutter build apk
|
||||||
|
- name: Deploy
|
||||||
|
uses: wzieba/[email protected]
|
||||||
|
with:
|
||||||
|
appId: ${{secrets.FIREBASE_ANDROID_APPID}}
|
||||||
|
token: ${{secrets.FIREBASE_TOKEN}}
|
||||||
|
groups: stream-testers
|
||||||
|
file: example/build/app/outputs/apk/release/app-release.apk
|
||||||
|
|||||||
Reference in New Issue
Block a user