-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
virskor
committed
Jan 3, 2021
1 parent
b408d93
commit cd737a9
Showing
152 changed files
with
15,064 additions
and
6,231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
a06c9e6ee74aebe4aa13e3e9300a5b89 | ||
cbcc2527cf03f6794e5fbef48ae5d5fd |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
6 changes: 6 additions & 0 deletions
6
packages/flutter_widget_from_html/.devcontainer/devcontainer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"dockerFile": "Dockerfile", | ||
"extensions": [ | ||
"Dart-Code.flutter" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-726 Bytes
...r_widget_from_html/.git-crypt/keys/default/0/198E3709005200295F5F9197BB9AC34B495C0626.gpg
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
patreon: daohoangson |
25 changes: 25 additions & 0 deletions
25
packages/flutter_widget_from_html/.github/workflows/android.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
43
packages/flutter_widget_from_html/.github/workflows/api.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
92
packages/flutter_widget_from_html/.github/workflows/demo_app.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
74
packages/flutter_widget_from_html/.github/workflows/flutter.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.