Skip to content

Commit

Permalink
本地依赖hTML组件更新
Browse files Browse the repository at this point in the history
  • Loading branch information
virskor committed Jan 3, 2021
1 parent b408d93 commit cd737a9
Show file tree
Hide file tree
Showing 152 changed files with 15,064 additions and 6,231 deletions.
2 changes: 1 addition & 1 deletion mobile/ios/Flutter/.last_build_id
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a06c9e6ee74aebe4aa13e3e9300a5b89
cbcc2527cf03f6794e5fbef48ae5d5fd
55 changes: 0 additions & 55 deletions packages/flutter_widget_from_html/.cirrus.yml

This file was deleted.

16 changes: 14 additions & 2 deletions packages/flutter_widget_from_html/.codecov.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
coverage:
status:
project:
default:
target: 90%
threshold: 0.5%
patch:
default:
target: 80%

ignore:
- ^lib/src/video_player.dart$
- ^lib/src/web_view.dart$
- "demo_app"
- "packages/enhanced/lib/src/external/"
- "packages/enhanced/lib/src/widgets/video_player.dart"
- "packages/enhanced/lib/src/widgets/web_view"
5 changes: 5 additions & 0 deletions packages/flutter_widget_from_html/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM mcr.microsoft.com/vscode/devcontainers/universal:linux

ADD build.sh /tmp/build.sh

RUN /bin/bash /tmp/build.sh
16 changes: 16 additions & 0 deletions packages/flutter_widget_from_html/.devcontainer/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

set -e

cd $HOME

sudo apt-get install -y jq
curl https://storage.googleapis.com/flutter_infra/releases/releases_linux.json -Lo /tmp/releases.json
_baseUrl=$( cat /tmp/releases.json | jq -r .base_url )
_stableHash=$( cat /tmp/releases.json | jq -r .current_release.stable )
_stableArchive=$( cat /tmp/releases.json | jq -r ".releases[] | select(.hash == \"$_stableHash\") | .archive" )
rm /tmp/releases.json

curl $_baseUrl/$_stableArchive -vo /tmp/flutter.tar.xz
tar -xf /tmp/flutter.tar.xz
echo 'PATH=$PATH:$HOME/flutter/bin' >> $HOME/.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"dockerFile": "Dockerfile",
"extensions": [
"Dart-Code.flutter"
]
}
4 changes: 0 additions & 4 deletions packages/flutter_widget_from_html/.git-crypt/.gitattributes

This file was deleted.

Binary file not shown.
1 change: 0 additions & 1 deletion packages/flutter_widget_from_html/.gitattributes

This file was deleted.

1 change: 1 addition & 0 deletions packages/flutter_widget_from_html/.github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
patreon: daohoangson
25 changes: 25 additions & 0 deletions packages/flutter_widget_from_html/.github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Android Test
on:
push:
paths:
- .github/workflows/android.yml
- packages/enhanced/lib/src/widgets/video_player.dart
- packages/enhanced/lib/src/widgets/web_view.dart
- 'packages/enhanced/lib/src/widgets/web_view/**'
- 'tool/sylph/**'
workflow_dispatch:

jobs:
sylph:
if: startsWith(github.ref, 'refs/head/wip')
env:
AWS_ACCESS_KEY_ID: AKIAY43IFJQXPIU46LXP
AWS_DEFAULT_REGION: us-west-2
AWS_SECRET_ACCESS_KEY: ${{ secrets.DEVICE_FARM_SECRET_ACCESS_KEY }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup Flutter
uses: subosito/flutter-action@v1
- run: ./tool/sylph/sylph.sh
43 changes: 43 additions & 0 deletions packages/flutter_widget_from_html/.github/workflows/api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: API
on:
push:
paths:
- .github/workflows/api.yml
- 'api/**'

jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: api

steps:
- uses: actions/checkout@v2
- name: Setup Flutter
uses: subosito/flutter-action@v1
- name: Deploy via now.sh
id: now
run: |
set -e
mkdir -p ./.now && echo '${{ secrets.API_PROJECT_JSON }}' > ./.now/project.json
if [ $GITHUB_REF == 'refs/heads/master' ]; then
_url=$( now --prod --token ${{ secrets.ZEIT_TOKEN }} )
else
_url=$( now --token ${{ secrets.ZEIT_TOKEN }} )
fi
_url="${_url//'%'/'%25'}"
_url="${_url//$'\n'/'%0A'}"
_url="${_url//$'\r'/'%0D'}"
echo "::set-output name=url::${_url}"
- name: Create commit comment
uses: daohoangson/comment-on-github@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: "Deployed ${{ github.sha }} to ${{ steps.now.outputs.url }}.\n\nQuick links:\n- [iframe](${{ steps.now.outputs.url }}/iframe.ts?body=Foo)"
fingerprint: "## Companion API"
replace: please
92 changes: 92 additions & 0 deletions packages/flutter_widget_from_html/.github/workflows/demo_app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Demo
on:
push:
paths:
- .github/workflows/demo_app.yml
- "demo_app/**"
- "packages/**"

jobs:
apk:
name: Build Android APKs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Flutter
uses: subosito/flutter-action@v1
- run: flutter build apk --split-per-abi
working-directory: demo_app
- uses: actions/upload-artifact@v2
with:
name: armeabi-v7a.apk
path: demo_app/build/app/outputs/apk/release/app-armeabi-v7a-release.apk
- uses: actions/upload-artifact@v2
with:
name: arm64-v8a.apk
path: demo_app/build/app/outputs/apk/release/app-arm64-v8a-release.apk
- uses: actions/upload-artifact@v2
with:
name: x86_64.apk
path: demo_app/build/app/outputs/apk/release/app-x86_64-release.apk

web:
name: Deploy Web
runs-on: ubuntu-latest
defaults:
run:
working-directory: demo_app

steps:
- uses: actions/checkout@v2

- name: Setup Flutter
uses: subosito/flutter-action@v1
with:
channel: beta
- run: flutter config --enable-web
- run: flutter build web

- name: Generate supported/tags.html
run: |
set -e
cd ./test/goldens
php tags.php >tags.html
cd ..
cp -R goldens ../build/web/supported
- name: Deploy via now.sh
id: now
run: |
set -e
cd ./build/web
{ \
echo '{'; \
echo ' "version": 2,'; \
echo ' "builds": ['; \
echo ' { "src": "./**/*", "use": "@now/static" }'; \
echo ' ]'; \
echo '}'; \
} > ./now.json
mkdir -p ./.now && echo '${{ secrets.DEMO_APP_PROJECT_JSON }}' > ./.now/project.json
if [ $GITHUB_REF == 'refs/heads/master' ]; then
_url=$( now --prod --token ${{ secrets.ZEIT_TOKEN }} )
else
_url=$( now --token ${{ secrets.ZEIT_TOKEN }} )
fi
_url="${_url//'%'/'%25'}"
_url="${_url//$'\n'/'%0A'}"
_url="${_url//$'\r'/'%0D'}"
echo "::set-output name=url::${_url}"
- name: Create commit comment
uses: daohoangson/comment-on-github@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: "Deployed ${{ github.sha }} to ${{ steps.now.outputs.url }}.\n\nQuick links:\n- [supported/tags.html](${{ steps.now.outputs.url }}/supported/tags.html)\n- [Hello World](${{ steps.now.outputs.url }}/#/helloworld)\n- [Hello World (core)](${{ steps.now.outputs.url }}/#/helloworldcore)\n- [Wordpress](${{ steps.now.outputs.url }}/#/wordpress)"
fingerprint: "## Demo app"
replace: please
74 changes: 74 additions & 0 deletions packages/flutter_widget_from_html/.github/workflows/flutter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Flutter
on:
push:
paths:
- .github/workflows/flutter.yml
- 'demo_app/test/**'
- 'demo_app/test_driver/**'
- 'packages/**'
- 'tool/dartdoc/**'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Flutter
uses: subosito/flutter-action@v1
- name: Run flutter format
run: flutter format --dry-run --set-exit-if-changed .
- name: Analyze core
run: cd packages/core && flutter analyze
- name: Analyze enhanced
run: cd packages/enhanced && flutter analyze
- name: Analyze demo_app
run: cd demo_app && flutter analyze

unit_test:
name: Unit test
strategy:
matrix:
channel: [dev, beta, stable]
continue-on-error: ${{ matrix.channel != 'stable' }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup Flutter
uses: subosito/flutter-action@v1
with:
channel: ${{ matrix.channel }}
- name: Run ./tool/test.sh
run: |
if [ "${{ matrix.channel }}" == "stable" ]; then
./tool/test.sh --coverage
bash <(curl -s https://codecov.io/bash)
else
./tool/test.sh
fi
- name: Submit to Codecov
if: matrix.channel == 'stable'
run: bash <(curl -s https://codecov.io/bash)

ios:
name: iOS Test
needs:
- analyze
- unit_test
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- name: Setup Flutter
uses: subosito/flutter-action@v1
- name: Create simulator
run: |
set -e
_deviceType=$( xcrun simctl list devicetypes iphone -j | jq '.devicetypes[-1]' )
_deviceTypeName=$( echo $_deviceType | jq .name -r )
_deviceTypeId=$( echo $_deviceType | jq .identifier -r )
_runTime=$( xcrun simctl list runtimes ios -j | jq '.runtimes[].identifier' -r | tail -n 1 )
xcrun simctl create "$_deviceTypeName" "$_deviceTypeId" "$_runTime" | xargs xcrun simctl boot
- run: ./tool/integration.sh
Loading

0 comments on commit cd737a9

Please sign in to comment.