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

feat(firebase_core): v1 rework (#7) #2890

Merged
merged 1 commit into from
Jul 3, 2020
Merged
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
111 changes: 111 additions & 0 deletions .github/workflows/all_plugins.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: all_plugins

on:
pull_request:
push:
branches:
- master

jobs:
analyze:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- uses: subosito/flutter-action@v1
with:
channel: "stable"
- name: "Install Tools"
run: |
pub global activate tuneup
pub global activate melos
echo "::add-path::$HOME/.pub-cache/bin"
- name: "Bootstrap Workspace"
run: melos bootstrap
- name: "Dart Analyze"
run: |
melos exec -c 3 -- \
tuneup check
- name: "Pub Check"
run: |
melos exec -c 1 --no-private --ignore="*example*" -- \
pub publish --dry-run

format:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- uses: subosito/flutter-action@v1
with:
channel: "stable"
- name: "Install Tools"
run: |
pub global activate melos
curl -sL https://github.com/google/google-java-format/releases/download/google-java-format-1.3/google-java-format-1.3-all-deps.jar -o $HOME/google-java-format.jar
echo "::add-path::$HOME/.pub-cache/bin"
- name: "Bootstrap Workspace"
run: melos bootstrap
- name: "Dart"
run: |
melos exec -c 1 -- \
flutter format .
./.github/workflows/scripts/validate-formatting.sh
- name: "Objective-C"
if: ${{ success() || failure() }}
run: |
melos exec -c 4 --ignore="*platform_interface*" --ignore="*web*" -- \
find . -maxdepth 3 -name "*.h" -o -name "*.m" -print0 \| xargs -0 clang-format -i --style=Google --verbose
./.github/workflows/scripts/validate-formatting.sh
- name: "Java"
if: ${{ success() || failure() }}
run: |
melos exec -c 4 --ignore="*platform_interface*" --ignore="*web*" -- \
find . -maxdepth 12 -name "*.java" -print0 \| xargs -0 java -jar $HOME/google-java-format.jar --replace
./.github/workflows/scripts/validate-formatting.sh

build_examples_dart:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- uses: subosito/flutter-action@v1
with:
channel: "stable"
- name: "Install Tools"
run: |
pub global activate melos
echo "::add-path::$HOME/.pub-cache/bin"
- name: "Bootstrap Workspace"
run: melos bootstrap
- name: "Build Example Snapshots"
run: |
melos exec -c 1 --scope="*example*" -- \
flutter build aot

test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- uses: subosito/flutter-action@v1
with:
channel: "stable"
- name: "Install Tools"
run: |
pub global activate melos
echo "::add-path::$HOME/.pub-cache/bin"
- name: "Bootstrap Workspace"
run: melos bootstrap
- name: "Flutter Test"
run: |
melos exec -c 3 --dir-exists=test --ignore="*example*" --ignore="*web*" -- \
flutter test
13 changes: 13 additions & 0 deletions .github/workflows/cancel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: cancel_previous
on: [push]
jobs:
cancel:
name: "Cancel Previous Runs"
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: styfle/[email protected]
with:
# TODO(Salakar): Update ids once on master.
workflow_id: 1411321,1411322,1414417,1414454,1414624,1414626,1414627
access_token: ${{ github.token }}
115 changes: 115 additions & 0 deletions .github/workflows/firebase_auth.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: firebase_auth

on:
pull_request:
paths:
- "packages/firebase_core/**"
- "packages/firebase_auth/**"
- ".github/workflows/firebase_auth.yaml"
push:
branches:
- master

env:
FLUTTERFIRE_PLUGIN_SCOPE: "*firebase_auth*"
FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE: "*firebase_auth_example*"

jobs:
android:
runs-on: macos-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- uses: subosito/flutter-action@v1
with:
channel: "stable"
- name: "Install Tools"
run: |
pub global activate melos
echo "::add-path::$HOME/.pub-cache/bin"
- name: "Bootstrap Workspace"
run: melos bootstrap
- name: "Build Example"
run: |
melos exec -c 1 --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" -- \
flutter build apk
- name: Download Emulator Image
run: |
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-28;google_apis;x86_64"
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd --force --name TestingAVD --device "Nexus 5X" -k 'system-images;android-28;google_apis;x86_64' -g google_apis
$ANDROID_HOME/emulator/emulator -list-avds
- name: Start Android Emulator
timeout-minutes: 15
continue-on-error: true
run: |
echo "Starting emulator"
nohup $ANDROID_HOME/emulator/emulator -avd TestingAVD -no-audio -no-snapshot -no-window -no-boot-anim &
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done'
$ANDROID_HOME/platform-tools/adb devices
$ANDROID_HOME/platform-tools/adb shell settings put global window_animation_scale 0.0
$ANDROID_HOME/platform-tools/adb shell settings put global transition_animation_scale 0.0
$ANDROID_HOME/platform-tools/adb shell settings put global animator_duration_scale 0.0
echo "Emulator started"
flutter emulators
- name: "Drive Example"
run: |
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

ios:
runs-on: macos-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- uses: subosito/flutter-action@v1
with:
channel: "stable"
- name: "Install Tools"
run: |
pub global activate melos
echo "::add-path::$HOME/.pub-cache/bin"
- name: "Bootstrap Workspace"
run: melos bootstrap
- name: "Build Example"
run: |
melos exec -c 1 --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" -- \
flutter build ios --no-codesign
- name: "Boot Simulator"
run: xcrun simctl boot "iPhone 11"
- name: "Drive Example"
run: |
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

web:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- uses: subosito/flutter-action@v1
with:
# https://github.com/subosito/flutter-action/issues/37
channel: "beta"
- name: "Install Tools"
run: |
pub global activate melos
flutter config --enable-web
echo "::add-path::$HOME/.pub-cache/bin"
- name: "Bootstrap Workspace"
run: melos bootstrap
- name: "Build Example"
run: |
melos exec -c 1 --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" --dir-exists=web -- \
flutter build web
- name: "Drive Example"
run: |
melos clean && melos bootstrap
chromedriver --port=4444 &
melos exec -c 1 --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" --dir-exists=web -- \
flutter drive --release --no-pub --verbose-system-logs --browser-name=chrome --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart
126 changes: 126 additions & 0 deletions .github/workflows/firebase_core.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: firebase_core

on:
pull_request:
paths:
- "packages/firebase_core/**"
- ".github/workflows/firebase_core.yaml"
push:
branches:
- master

env:
FLUTTERFIRE_PLUGIN_SCOPE: "*firebase_core*"
FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE: "*firebase_core_example*"

jobs:
android:
runs-on: macos-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- uses: subosito/flutter-action@v1
with:
channel: "stable"
- name: "Install Tools"
run: |
pub global activate melos
echo "::add-path::$HOME/.pub-cache/bin"
- name: "Bootstrap Workspace"
run: melos bootstrap
- name: "Build Example"
run: |
melos exec -c 1 --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" -- \
flutter build apk
- name: Download Emulator Image
run: |
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-28;google_apis;x86_64"
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd --force --name TestingAVD --device "Nexus 5X" -k 'system-images;android-28;google_apis;x86_64' -g google_apis
$ANDROID_HOME/emulator/emulator -list-avds
- name: Start Android Emulator
timeout-minutes: 15
continue-on-error: true
run: |
echo "Starting emulator"
nohup $ANDROID_HOME/emulator/emulator -avd TestingAVD -no-audio -no-snapshot -no-window -no-boot-anim &
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done'
$ANDROID_HOME/platform-tools/adb devices
$ANDROID_HOME/platform-tools/adb shell settings put global window_animation_scale 0.0
$ANDROID_HOME/platform-tools/adb shell settings put global transition_animation_scale 0.0
$ANDROID_HOME/platform-tools/adb shell settings put global animator_duration_scale 0.0
echo "Emulator started"
flutter emulators
- name: "Drive Example"
run: |
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

apple:
runs-on: macos-latest
timeout-minutes: 35
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- uses: subosito/flutter-action@v1
with:
channel: "dev"
- name: "Install Tools"
run: |
pub global activate melos
echo "::add-path::$HOME/.pub-cache/bin"
flutter config --enable-macos-desktop
flutter devices
- name: "Bootstrap Workspace"
run: melos bootstrap
- name: "Build iOS Example"
run: |
melos exec -c 1 --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" -- \
flutter build ios --no-codesign
- name: "Boot Simulator"
run: xcrun simctl boot "iPhone 11"
- name: "Drive iOS Example"
run: |
melos exec -c 1 --fail-fast --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" --dir-exists=test_driver -- \
flutter drive -d \"iPhone 11\" --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart
- name: "Shutdown Simulator"
run: xcrun simctl shutdown "iPhone 11"
- name: "Build MacOS Example"
run: |
melos exec -c 1 --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" -- \
flutter build macos
- name: "Drive MacOS Example"
run: |
melos exec -c 1 --fail-fast --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" --dir-exists=test_driver -- \
flutter drive -d macos --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart

web:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- uses: subosito/flutter-action@v1
with:
# https://github.com/subosito/flutter-action/issues/37
channel: "beta"
- name: "Install Tools"
run: |
pub global activate melos
flutter config --enable-web
echo "::add-path::$HOME/.pub-cache/bin"
- name: "Bootstrap Workspace"
run: melos bootstrap
- name: "Build Example"
run: |
melos exec -c 1 --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" --dir-exists=web -- \
flutter build web
- name: "Drive Example"
run: |
melos clean && melos bootstrap
chromedriver --port=4444 &
melos exec -c 1 --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" --dir-exists=web -- \
flutter drive --release --no-pub --verbose-system-logs --browser-name=chrome --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart
Loading