Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(CI): device log artifacts, soft-fail retries, bump deps [WIP] #4265

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/firebase_remote_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: macos-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "Install Flutter"
Expand All @@ -43,7 +43,7 @@ jobs:
runs-on: macos-latest
timeout-minutes: 35
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "Install Flutter"
Expand Down
102 changes: 86 additions & 16 deletions .github/workflows/firebase_storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- master
paths-ignore:
- "docs/**"
- "**/*.md"

env:
FLUTTERFIRE_PLUGIN_SCOPE: "*firebase_storage*"
Expand All @@ -21,15 +22,33 @@ jobs:
runs-on: macos-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v1
- uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "Install Flutter"
run: ./.github/workflows/scripts/install-flutter.sh dev
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
retry_wait_seconds: 60
max_attempts: 3
command: ./.github/workflows/scripts/install-flutter.sh dev
- name: "Install Tools"
run: ./.github/workflows/scripts/install-tools.sh
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
retry_wait_seconds: 60
max_attempts: 3
command: ./.github/workflows/scripts/install-tools.sh
- name: "Build Example"
run: ./.github/workflows/scripts/build-example.sh android
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
retry_wait_seconds: 60
max_attempts: 3
command: ./.github/workflows/scripts/build-example.sh android
- name: "Drive Example"
uses: reactivecircus/android-emulator-runner@v2
with:
Expand All @@ -40,41 +59,92 @@ jobs:
target: default
profile: Nexus 5X
script: ./.github/workflows/scripts/drive-example.sh android
- name: Compress Emulator Log
if: always()
run: gzip -9 adb-log.txt
shell: bash
- name: Upload Emulator Log
uses: actions/upload-artifact@v2
if: always()
with:
name: adb_logs
path: adb-log.txt.gz

apple:
runs-on: macos-latest
timeout-minutes: 35
steps:
- uses: actions/checkout@v1
- uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "Install Flutter"
run: ./.github/workflows/scripts/install-flutter.sh dev
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
retry_wait_seconds: 60
max_attempts: 3
command: ./.github/workflows/scripts/install-flutter.sh dev
- name: "Install Tools"
run: |
./.github/workflows/scripts/install-tools.sh
flutter config --enable-macos-desktop
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
retry_wait_seconds: 60
max_attempts: 3
command: ./.github/workflows/scripts/install-tools.sh && flutter config --enable-macos-desktop
- name: "Build iOS Example"
run: ./.github/workflows/scripts/build-example.sh ios
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
retry_wait_seconds: 60
max_attempts: 3
command: ./.github/workflows/scripts/build-example.sh ios
- name: "Drive iOS Example"
run: ./.github/workflows/scripts/drive-example.sh ios
- name: Compress Simulator Log
if: always()
run: gzip -9 simulator.log
- name: Upload Simulator Log
uses: actions/upload-artifact@v2
if: always()
with:
name: simulator_logs
path: simulator.log.gz
- name: "Build MacOS Example"
run: ./.github/workflows/scripts/build-example.sh macos
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
retry_wait_seconds: 60
max_attempts: 3
command: ./.github/workflows/scripts/build-example.sh macos
- name: "Drive MacOS Example"
run: ./.github/workflows/scripts/drive-example.sh macos

web:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v1
- uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "Install Flutter"
run: ./.github/workflows/scripts/install-flutter.sh beta
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
retry_wait_seconds: 60
max_attempts: 3
command: ./.github/workflows/scripts/install-flutter.sh beta
- name: "Install Tools"
run: |
./.github/workflows/scripts/install-tools.sh
flutter config --enable-web
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
retry_wait_seconds: 60
max_attempts: 3
command: ./.github/workflows/scripts/install-tools.sh && flutter config --enable-web
- name: "Drive Example"
run: ./.github/workflows/scripts/drive-example.sh web
2 changes: 1 addition & 1 deletion .github/workflows/pr_title.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v1.2.0
- uses: amannn/action-semantic-pull-request@v2.1.0
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
10 changes: 8 additions & 2 deletions .github/workflows/scripts/drive-example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ if [ "$ACTION" == "android" ]
then
# Sleep to allow emulator to settle.
sleep 15

# Create an emulator log for troubleshooting, will be uploaded as an artifact
nohup sh -c "$ANDROID_HOME/platform-tools/adb logcat '*:D' > adb-log.txt" &

melos exec -c 1 --fail-fast --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" --dir-exists=test_driver -- \
flutter drive --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart --dart-define=CI=true
exit
Expand All @@ -19,8 +23,10 @@ then
xcrun simctl logverbose "$SIMULATOR" enable
# Sleep to allow simulator to settle.
sleep 15
# Uncomment following line to have simulator logs printed out for debugging purposes.
# xcrun simctl spawn booted log stream --predicate 'eventMessage contains "flutter"' &

# Create a simulator log for troubleshooting, will be uploaded as an artifact
nohup sh -c "sleep 30 && xcrun simctl spawn booted log stream --level debug --style compact > simulator.log 2>&1 &"

melos exec -c 1 --fail-fast --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" --dir-exists=test_driver -- \
flutter drive -d \"$SIMULATOR\" --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart --dart-define=CI=true
MELOS_EXIT_CODE=$?
Expand Down