forked from egovernments/punjab-mgramseva
-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (55 loc) · 2.17 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Set up self hosted runners by using following
# https://digit-discuss.atlassian.net/wiki/spaces/DD/pages/1998848002/Integration+Testing+with+GitHub+Actions
# Name of your workflow.
name: integration-test
# Trigger the workflow on push or pull requests.
on:
push:
branches: [ develop ]
# A workflow run is made up of one or more jobs.
jobs:
# id of job, a string that is unique to the "jobs" node above.
drive_android:
# The type of machine to run the job on.
runs-on: self-hosted
# Creates a build matrix for your jobs. You can define different
# variations of an environment to run each job in.
strategy:
# A set of different configurations of the virtual
# environment.
matrix:
api-level: [ 30 ]
target: [ default ]
# Contains a sequence of tasks.
steps:
# The branch or tag ref that triggered the workflow will be
# checked out.
- uses: actions/checkout@v2
# Sets up a java environment.
- uses: actions/setup-java@v1
with:
java-version: '1.8.x'
# Sets up a Flutter environment.
- uses: subosito/flutter-action@v1
with:
flutter-version: '2.5.2'
channel: 'stable'
- name: "Run Flutter Driver tests"
#Operation for installing, configuring and running Android emulator
# https://github.com/marketplace/actions/android-emulator-runner
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: x86_64
profile: Nexus 6
script: "cd ./frontend/mgramseva && flutter drive --dart-define=BASE_PATH=https://mgramseva-qa.egov.org.in/
--driver=test_driver/integration_test_driver.dart --target=integration_test/login_test.dart"
# checking out to respective directory and building the apk
- name: "flutter pub get"
run: cd ./frontend/mgramseva && flutter build apk
# uploading the release build to artifact
- uses: actions/upload-artifact@v1
with:
name: release-apk
path: frontend/mgramseva/build/app/outputs/apk/release/app-release.apk