Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ed60bec
update melos to support more functions and compatible with latest ver…
mhadaily Oct 2, 2021
29ed886
Transition of platform channel test interfaces to flutter_test package
mhadaily Oct 2, 2021
8cdac45
Merge branch 'upgrade_depreciated_test_related_functions' into fix_in…
mhadaily Oct 2, 2021
5fc5444
new workflows for all plugins
mhadaily Oct 2, 2021
40add65
new scripts
mhadaily Oct 2, 2021
62bca83
rename branch to main
mhadaily Oct 2, 2021
3ac8f2e
fix name
mhadaily Oct 2, 2021
a1693fb
add external to stuct
mhadaily Oct 2, 2021
cd5fc15
add workflow for each package
mhadaily Oct 2, 2021
e56ec1e
remove default directory
mhadaily Oct 2, 2021
c7432e6
add flutter config
mhadaily Oct 2, 2021
dcd4adc
remove package workflow temp
mhadaily Oct 2, 2021
954e9e4
add integration test
mhadaily Oct 3, 2021
ffffb3e
disbale integration test
mhadaily Oct 3, 2021
5423990
update workflow
mhadaily Oct 3, 2021
7ffd22a
ignore strategy for integraitontest
mhadaily Oct 3, 2021
01f837e
Merge branch 'main' into fix_integration_test_ci
mhadaily Oct 3, 2021
d781180
update ci
mhadaily Oct 3, 2021
a121a9a
add --no-select
mhadaily Oct 3, 2021
a665c4e
Merge branch 'main' into fix_integration_test_ci
mhadaily Oct 3, 2021
e3f97b3
disable linux and windows
mhadaily Oct 3, 2021
eb17169
for now run only on macos-latest
mhadaily Oct 3, 2021
7e1913a
remove if
mhadaily Oct 3, 2021
16af2ad
keep only macos
mhadaily Oct 3, 2021
f2bd08c
Merge branch 'main' into fix_integration_test_ci
mhadaily Oct 3, 2021
03d8ec8
fix comments
mhadaily Oct 3, 2021
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
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
93 changes: 93 additions & 0 deletions .github/_backup/share_plus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: share_plus

on:
pull_request:
paths:
- "packages/share_plus/**"
- ".github/workflows/share_plus.yaml"
push:
branches:
- main
paths-ignore:
- "docs/**"
- "**.md"

# defaults:
# run:
# working-directory: packages/share_plus

env:
PLUS_PLUGIN_SCOPE: "*share_plus*"
PLUS_PLUGIN_SCOPE_EXAMPLE: "*share_plus_example*"

jobs:
build:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
timeout-minutes: 15
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: "Install Flutter"
run: ./.github/workflows/scripts/install-flutter.sh stable
- name: "Install Tools"
run: |
./.github/workflows/scripts/install-tools.sh
- name: "Build Web Example"
run: |
./.github/workflows/scripts/build-example.sh web
if: matrix.os == 'ubuntu-latest'
- name: "Build Linux Example"
run: |
./.github/workflows/scripts/build-example.sh linux
if: matrix.os == 'ubuntu-latest'
- name: "Build Android Example"
run: |
./.github/workflows/scripts/build-example.sh android
if: matrix.os == 'macos-latest'
- name: "Build Web Example"
run: |
./.github/workflows/scripts/build-example.sh ios
if: matrix.os == 'macos-latest'
- name: "Build Web Example"
run: |
./.github/workflows/scripts/build-example.sh macos
if: matrix.os == 'macos-latest'
- name: "Build Web Example"
run: |
./.github/workflows/scripts/build-example.sh windows
if: matrix.os == 'windows-latest'

integration_tests:
if: false # currently broken, see issue 220
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest]
timeout-minutes: 15
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: "Install Flutter"
run: ./.github/workflows/scripts/install-flutter.sh stable
- name: "Install Tools"
run: ./.github/workflows/scripts/install-tools.sh
- name: "Setup Linux"
run: |
sudo apt update
sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format
sudo apt install -y network-manager upower
flutter config --enable-linux-desktop
if: matrix.os == 'ubuntu-latest'
- name: "Bootstrap Workspace"
run: melos bootstrap
- name: "Flutter Integration Test"
run: |
melos run test:mobile_e2e --no-select
melos run test:web_e2e --no-select
melos run test:linux_e2e --no-select
if: matrix.os == 'ubuntu-latest'
225 changes: 149 additions & 76 deletions .github/workflows/all_plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,153 +2,226 @@ name: all_plugins

on:
pull_request:
paths-ignore:
- "docs/**"
- "website/**"
- "**.md"
push:
branches:
- main
paths-ignore:
- "docs/**"
- "website/**"
- "**.md"

jobs:
analyze:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: "Git Checkout"
uses: actions/checkout@v2
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: "Install Flutter"
uses: subosito/flutter-action@v1
with:
flutter-version: "2.2.1"
run: ./.github/workflows/scripts/install-flutter.sh stable
- name: "Install Tools"
run: |
flutter pub global activate melos
flutter pub global activate tuneup
./.github/workflows/scripts/install-tools.sh
- name: "Bootstrap Workspace"
run: melos bootstrap
- name: "Dart Analyze"
run: |
melos run analyze
- name: "Run Analyze"
run: melos run analyze
- name: "Pub Check"
run: |
melos run lint:pub
melos exec -c 1 --no-private --ignore="*example*" -- \
pub publish --dry-run

format:
pub_get_check:
timeout-minutes: 15
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: "Git Checkout"
uses: actions/checkout@v2
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: "Install Flutter"
uses: subosito/flutter-action@v1
with:
flutter-version: "2.2.1"
run: ./.github/workflows/scripts/install-flutter.sh stable
- name: "Install Tools"
run: |
sudo apt update
sudo apt install -y clang-format
flutter pub global activate melos
pub global activate flutter_plugin_tools 0.1.4
- name: "Bootstrap Workspace"
run: melos bootstrap
- name: "Melos Format"
run: melos run format
- name: "Validate Formatting"
./.github/workflows/scripts/install-tools.sh
- name: "Flutter Pub Get"
run: |
./.github/workflows/scripts/validate-formatting.sh
melos exec -c 1 --scope="*example*" -- \
"flutter pub get"

build_examples_dart:
timeout-minutes: 15
format:
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- name: "Git Checkout"
uses: actions/checkout@v2
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: "Install Flutter"
uses: subosito/flutter-action@v1
with:
flutter-version: "2.2.1"
run: ./.github/workflows/scripts/install-flutter.sh stable
- name: "Install Tools"
run: flutter pub global activate melos
run: |
./.github/workflows/scripts/install-tools.sh
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
- name: "Bootstrap Workspace"
run: melos bootstrap
- name: "Build Example Snapshots"
- 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 run build:examples:bundle
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

test:
build_examples_dart:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
continue-on-error: true
timeout-minutes: 15
os: [macos-latest]
timeout-minutes: 40
steps:
- name: "Git Checkout"
uses: actions/checkout@v2
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

- name: "Install Flutter"
uses: subosito/flutter-action@v1
run: ./.github/workflows/scripts/install-flutter.sh stable

- name: "Install Tools"
run: |
./.github/workflows/scripts/install-tools.sh

- name: "Bootstrap Workspace"
run: melos bootstrap

- name: "Build iOs,Android, and web Examples"
run: melos run build:all
if: matrix.os == 'macos-latest'

# - name: "Build Linux Examples"
# run: |
# flutter config --enable-linux-desktop
# melos run build:example_linux --no-select
# if: matrix.os == 'ubuntu-latest'

# - name: "Build windows Examples"
# run: melos run build:example_windows
# if: matrix.os == 'windows-latest'

# - name: "Build macos Examples"
# run: |
# flutter config --enable-macos-desktop
# melos run build:example_macos --no-select
# if: matrix.os == 'macos-latest'

test_and_coverage:
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- uses: actions/checkout@v2.3.4
with:
flutter-version: "2.2.1"
fetch-depth: 0

- name: "Install Flutter"
run: ./.github/workflows/scripts/install-flutter.sh stable

- name: "Install Tools"
run: flutter pub global activate melos
run: ./.github/workflows/scripts/install-tools.sh

- name: "Bootstrap Workspace"
run: melos bootstrap

- name: "Flutter Test"
run: |
melos run test
if: matrix.os != 'ubuntu-latest'
- name: "Flutter web Test"
run: |
melos run test:web
if: matrix.os != 'ubuntu-latest'
run: melos run test --no-select

- name: "Flutter Test - Web"
run: melos run test:web --no-select

- name: "Collect Coverage"
run: |
melos run coverage
if: matrix.os == 'ubuntu-latest'
run: melos run coverage

- name: Upload Coverage
uses: codecov/codecov-action@v1
with:
token: ${{secrets.CODECOV_TOKEN}}
files: packages/*/coverage/lcov.info
if: matrix.os == 'ubuntu-latest'

integration_tests:
if: false # currently broken, see issue 220
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest]
continue-on-error: true
timeout-minutes: 15
runs-on: macos-latest
timeout-minutes: 40
steps:
- name: "Git Checkout"
uses: actions/checkout@v2
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

- name: "Install Flutter"
uses: subosito/flutter-action@v1
with:
channel: dev
run: ./.github/workflows/scripts/install-flutter.sh stable

- name: "Install Tools"
run: |
flutter pub global activate melos
flutter config --enable-linux-desktop
run: ./.github/workflows/scripts/install-tools.sh

- name: "Bootstrap Workspace"
run: melos bootstrap

- uses: nanasess/setup-chromedriver@master
with:
chromedriver-version: "94.0.4606.61"

- name: "Setup Linux"
run: |
sudo apt update
sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format
sudo apt install -y network-manager upower
if: matrix.os == 'ubuntu-latest'
- name: "Bootstrap Workspace"
run: melos bootstrap
- name: "Flutter Integration Test"

- name: "Flutter Linux Integration Test"
run: |
melos run test:e2e:linux
flutter config --enable-linux-desktop
./.github/workflows/scripts/drive-example.sh linux
if: matrix.os == 'ubuntu-latest'

- name: "Drive Android Integration Test"
if: matrix.os == 'macos-latest'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 30
arch: x86_64
target: google_apis
profile: Nexus 5X
script: ./.github/workflows/scripts/drive-example.sh android

# - name: "Flutter Windows Integration Test"
# run: |
# flutter config --enable-windows-desktop
# ./.github/workflows/scripts/drive-example.sh windows
# if: matrix.os == 'windows-latest'

- name: "Drive iOS Integration Test"
run: |
./.github/workflows/scripts/drive-example.sh ios
if: matrix.os == 'macos-latest'

- name: "Drive MacOS Integration Test"
run: |
flutter config --enable-macos-desktop
./.github/workflows/scripts/drive-example.sh macos
if: matrix.os == 'macos-latest'

- name: "Drive Web Integration Test"
run: |
./.github/workflows/scripts/drive-example.sh web
if: matrix.os == 'linux-latest'
Loading