33name : geocoding_android
44
55# Controls when the action will run. Triggers the workflow on push or pull request
6- # events but only for the develop branch
6+ # events but only for the master branch
77on :
88 push :
9- branches : [ master, develop ]
9+ branches : [ master ]
1010 paths :
1111 - ' geocoding_android/**'
1212 pull_request :
13- branches : [ master, develop ]
13+ branches : [ master ]
1414 paths :
1515 - ' geocoding_android/**'
1616
1717# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1818jobs :
19- format :
20- name : Format
19+ build :
20+ name : Android platform package
2121
2222 # The type of runner that the job will run on
2323 runs-on : ubuntu-latest
2424
2525 env :
26- source-directory : ./geocoding_android
26+ source-directory : ./geocoding_android
27+ example-directory : ./geocoding_android/example
2728
2829 # Steps represent a sequence of tasks that will be executed as part of the job
2930 steps :
@@ -44,102 +45,14 @@ jobs:
4445 - name : Run Flutter Format
4546 run : flutter format --set-exit-if-changed .
4647 working-directory : ${{env.source-directory}}
47-
48- analyze :
49- name : Analyze
50-
51- # The type of runner that the job will run on
52- runs-on : ubuntu-latest
5348
54- env :
55- source-directory : ./geocoding_android
56-
57- # Steps represent a sequence of tasks that will be executed as part of the job
58- steps :
59- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
60- - uses : actions/checkout@v3
61-
62- # Make sure the stable version of Flutter is available
63- - uses : subosito/flutter-action@v2
64- with :
65- channel : ' stable'
66-
67- # Download all Flutter packages
68- - name : Download dependencies
69- run : flutter pub get
70- working-directory : ${{env.source-directory}}
71-
7249 # Run Flutter Analyzer
7350 - name : Run Flutter Analyzer
7451 run : flutter analyze
7552 working-directory : ${{env.source-directory}}
76-
77- build_android :
78- name : Build Android App
79-
80- # The type of runner that the job will run on
81- runs-on : ubuntu-latest
82-
83- env :
84- source-directory : ./geocoding_android
85- example-directory : ./geocoding_android/example
86-
87- # Steps represent a sequence of tasks that will be executed as part of the job
88- steps :
89- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
90- - uses : actions/checkout@v3
91-
92- # Ensure correct JAVA version is installed.
93- - uses : actions/setup-java@v1
94- with :
95- java-version : ' 12.x'
96-
97- # Make sure the stable version of Flutter is available
98- - uses : subosito/flutter-action@v2
99- with :
100- channel : ' stable'
101-
102- # Download all Flutter packages
103- - name : Download dependencies
104- run : flutter pub get
105- working-directory : ${{env.source-directory}}
10653
10754 # Build Android version of the example App
10855 - name : Run Android build
10956 run : flutter build apk --release
11057 working-directory : ${{env.example-directory}}
111-
112- tests :
113- name : Unit-tests
114- # The type of runner that the job will run on
115- runs-on : ubuntu-latest
116-
117- env :
118- source-directory : ./geocoding_android
119-
120- # Steps represent a sequence of tasks that will be executed as part of the job
121- steps :
122- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
123- - uses : actions/checkout@v3
124-
125- # Make sure the stable version of Flutter is available
126- - uses : subosito/flutter-action@v2
127- with :
128- channel : ' stable'
129-
130- # Download all Flutter packages
131- - name : Download dependencies
132- run : flutter pub get
133- working-directory : ${{env.source-directory}}
134-
135- # Run all unit-tests with code coverage
136- - name : Run unit tests
137- run : flutter test --coverage
138- working-directory : ${{env.source-directory}}
139-
140- # Upload code coverage information
141- - uses : codecov/codecov-action@v1
142- with :
143- file : ${{env.source-directory}}/coverage/lcov.info # optional
144- name : Geocoding Android # optional
145- fail_ci_if_error : true
58+
0 commit comments