Skip to content

Commit

Permalink
Added Workflow for Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
LiquidatorCoder committed Jun 3, 2020
1 parent 6604ab5 commit c61d5a2
Show file tree
Hide file tree
Showing 4 changed files with 202 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/main.yaml
@@ -0,0 +1,63 @@
name: Analyze, build and deploy
on: [push,pull_request]
jobs:

test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
flutter-version: '1.17.0'
channel: 'stable'
- run: flutter pub get
- run: flutter analyze

drive_android:
runs-on: macos-latest
strategy:
matrix:
api-level: [21, 29]
target: [default]
needs: test
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
flutter-version: '1.17.0'
channel: 'stable'
- name: Run Flutter Driver tests
uses: reactivecircus/android-emulator-runner@v1
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: x86_64
profile: Nexus 6
script: flutter drive --target=test_driver/app.dart

build_deploy:
if: github.event_name != 'pull_request'
runs-on: windows-latest
needs: [drive_android,test]
name: Build Release APK File
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
flutter-version: '1.17.0'
channel: 'stable'
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- run: flutter config --enable-linux-desktop
- run: flutter config --enable-macos-desktop
- run: flutter config --enable-windows-desktop
- run: flutter pub get
- run: flutter build windows --release
- run: flutter build apk --debug --split-per-abi
- name: Create a Release APK and Windows Destop App
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/apk/debug/*.apk,build/windows/Build/Products/Release/*.app"
token: ${{ secrets.GITHUB_TOKEN }}

129 changes: 129 additions & 0 deletions pubspec.lock
Expand Up @@ -148,6 +148,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
coverage:
dependency: transitive
description:
name: coverage
url: "https://pub.dartlang.org"
source: hosted
version: "0.13.9"
crypto:
dependency: transitive
description:
Expand Down Expand Up @@ -176,6 +183,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.6"
file:
dependency: transitive
description:
name: file
url: "https://pub.dartlang.org"
source: hosted
version: "5.1.0"
fixnum:
dependency: transitive
description:
Expand All @@ -188,6 +202,11 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_driver:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_screenutil:
dependency: "direct main"
description:
Expand Down Expand Up @@ -219,6 +238,11 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "8.8.1"
fuchsia_remote_debug_protocol:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
glob:
dependency: transitive
description:
Expand Down Expand Up @@ -324,6 +348,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
json_rpc_2:
dependency: transitive
description:
name: json_rpc_2
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
logging:
dependency: transitive
description:
Expand Down Expand Up @@ -352,6 +383,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.6+3"
multi_server_socket:
dependency: transitive
description:
name: multi_server_socket
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
node_interop:
dependency: transitive
description:
Expand All @@ -366,6 +404,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.1"
node_preamble:
dependency: transitive
description:
name: node_preamble
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.10"
package_config:
dependency: transitive
description:
Expand Down Expand Up @@ -436,6 +481,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.0"
process:
dependency: transitive
description:
name: process
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.12"
pub_semver:
dependency: transitive
description:
Expand Down Expand Up @@ -478,6 +530,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.7.5"
shelf_packages_handler:
dependency: transitive
description:
name: shelf_packages_handler
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
shelf_static:
dependency: transitive
description:
name: shelf_static
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.8"
shelf_web_socket:
dependency: transitive
description:
Expand All @@ -497,6 +563,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.5"
source_map_stack_trace:
dependency: transitive
description:
name: source_map_stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
source_maps:
dependency: transitive
description:
name: source_maps
url: "https://pub.dartlang.org"
source: hosted
version: "0.10.9"
source_span:
dependency: transitive
description:
Expand Down Expand Up @@ -539,20 +619,41 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
sync_http:
dependency: transitive
description:
name: sync_http
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
test:
dependency: "direct dev"
description:
name: test
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.4"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.15"
test_core:
dependency: transitive
description:
name: test_core
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.4"
timing:
dependency: transitive
description:
Expand Down Expand Up @@ -602,6 +703,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
vm_service:
dependency: transitive
description:
name: vm_service
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.4"
vm_service_client:
dependency: transitive
description:
name: vm_service_client
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.6+2"
watcher:
dependency: transitive
description:
Expand All @@ -616,6 +731,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
webdriver:
dependency: transitive
description:
name: webdriver
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
webkit_inspection_protocol:
dependency: transitive
description:
name: webkit_inspection_protocol
url: "https://pub.dartlang.org"
source: hosted
version: "0.7.3"
xml:
dependency: transitive
description:
Expand Down
3 changes: 3 additions & 0 deletions pubspec.yaml
Expand Up @@ -40,6 +40,9 @@ dependencies:
# quiver: 2.1.0

dev_dependencies:
flutter_driver:
sdk: flutter
test: any
flutter_test:
sdk: flutter
hive_generator: 0.5.1
Expand Down
7 changes: 7 additions & 0 deletions test_driver/app.dart
@@ -0,0 +1,7 @@
import 'package:flutter_driver/driver_extension.dart';
import 'package:stocks_app/main.dart' as app;

void main() {
enableFlutterDriverExtension();
app.main();
}

0 comments on commit c61d5a2

Please sign in to comment.