Skip to content

Commit 29b9341

Browse files
Travis Shepparddnys1
authored andcommitted
chore: migrate Flutter unit tests to GH actions (#2741)
1 parent 68a099c commit 29b9341

11 files changed

+312
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: amplify_analytics_pinpoint
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- stable
7+
pull_request:
8+
paths:
9+
- 'packages/analytics/amplify_analytics_pinpoint/**/*.dart'
10+
- 'packages/analytics/amplify_analytics_pinpoint/**/*.yaml'
11+
- 'packages/analytics/amplify_analytics_pinpoint/lib/**/*'
12+
- 'packages/analytics/amplify_analytics_pinpoint/test/**/*'
13+
- '.github/workflows/flutter_vm.yaml'
14+
- '.github/workflows/amplify_analytics_pinpoint.yaml'
15+
schedule:
16+
- cron: "0 0 * * 0" # Every Sunday at 00:00
17+
defaults:
18+
run:
19+
shell: bash
20+
permissions: read-all
21+
22+
jobs:
23+
test:
24+
uses: ./.github/workflows/flutter_vm.yaml
25+
with:
26+
working-directory: packages/analytics/amplify_analytics_pinpoint

.github/workflows/amplify_api.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: amplify_api
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- stable
7+
pull_request:
8+
paths:
9+
- 'packages/api/amplify_api/**/*.dart'
10+
- 'packages/api/amplify_api/**/*.yaml'
11+
- 'packages/api/amplify_api/lib/**/*'
12+
- 'packages/api/amplify_api/test/**/*'
13+
- '.github/workflows/flutter_vm.yaml'
14+
- '.github/workflows/amplify_api.yaml'
15+
schedule:
16+
- cron: "0 0 * * 0" # Every Sunday at 00:00
17+
defaults:
18+
run:
19+
shell: bash
20+
permissions: read-all
21+
22+
jobs:
23+
test:
24+
uses: ./.github/workflows/flutter_vm.yaml
25+
with:
26+
working-directory: packages/api/amplify_api
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: amplify_auth_cognito
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- stable
7+
pull_request:
8+
paths:
9+
- 'packages/auth/amplify_auth_cognito/**/*.dart'
10+
- 'packages/auth/amplify_auth_cognito/**/*.yaml'
11+
- 'packages/auth/amplify_auth_cognito/lib/**/*'
12+
- 'packages/auth/amplify_auth_cognito/test/**/*'
13+
- '.github/workflows/flutter_vm.yaml'
14+
- '.github/workflows/amplify_auth_cognito.yaml'
15+
schedule:
16+
- cron: "0 0 * * 0" # Every Sunday at 00:00
17+
defaults:
18+
run:
19+
shell: bash
20+
permissions: read-all
21+
22+
jobs:
23+
test:
24+
uses: ./.github/workflows/flutter_vm.yaml
25+
with:
26+
working-directory: packages/auth/amplify_auth_cognito
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: amplify_authenticator
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- stable
7+
pull_request:
8+
paths:
9+
- 'packages/amplify_authenticator/**/*.dart'
10+
- 'packages/amplify_authenticator/**/*.yaml'
11+
- 'packages/amplify_authenticator/lib/**/*'
12+
- 'packages/amplify_authenticator/test/**/*'
13+
- '.github/workflows/flutter_vm.yaml'
14+
- '.github/workflows/amplify_authenticator.yaml'
15+
schedule:
16+
- cron: "0 0 * * 0" # Every Sunday at 00:00
17+
defaults:
18+
run:
19+
shell: bash
20+
permissions: read-all
21+
22+
jobs:
23+
test:
24+
uses: ./.github/workflows/flutter_vm.yaml
25+
with:
26+
working-directory: packages/amplify_authenticator

.github/workflows/amplify_core.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: amplify_core
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- stable
7+
pull_request:
8+
paths:
9+
- 'packages/amplify_core/**/*.dart'
10+
- 'packages/amplify_core/**/*.yaml'
11+
- 'packages/amplify_core/lib/**/*'
12+
- 'packages/amplify_core/test/**/*'
13+
- '.github/workflows/flutter_vm.yaml'
14+
- '.github/workflows/amplify_core.yaml'
15+
schedule:
16+
- cron: "0 0 * * 0" # Every Sunday at 00:00
17+
defaults:
18+
run:
19+
shell: bash
20+
permissions: read-all
21+
22+
jobs:
23+
test:
24+
uses: ./.github/workflows/flutter_vm.yaml
25+
with:
26+
working-directory: packages/amplify_core
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: amplify_datastore
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- stable
7+
pull_request:
8+
paths:
9+
- 'packages/amplify_datastore/**/*.dart'
10+
- 'packages/amplify_datastore/**/*.yaml'
11+
- 'packages/amplify_datastore/lib/**/*'
12+
- 'packages/amplify_datastore/test/**/*'
13+
- '.github/workflows/flutter_vm.yaml'
14+
- '.github/workflows/amplify_datastore.yaml'
15+
schedule:
16+
- cron: "0 0 * * 0" # Every Sunday at 00:00
17+
defaults:
18+
run:
19+
shell: bash
20+
permissions: read-all
21+
22+
jobs:
23+
test:
24+
uses: ./.github/workflows/flutter_vm.yaml
25+
with:
26+
working-directory: packages/amplify_datastore
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: amplify_datastore_plugin_interface
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- stable
7+
pull_request:
8+
paths:
9+
- 'packages/amplify_datastore_plugin_interface/**/*.dart'
10+
- 'packages/amplify_datastore_plugin_interface/**/*.yaml'
11+
- 'packages/amplify_datastore_plugin_interface/lib/**/*'
12+
- 'packages/amplify_datastore_plugin_interface/test/**/*'
13+
- '.github/workflows/flutter_vm.yaml'
14+
- '.github/workflows/amplify_datastore_plugin_interface.yaml'
15+
schedule:
16+
- cron: "0 0 * * 0" # Every Sunday at 00:00
17+
defaults:
18+
run:
19+
shell: bash
20+
permissions: read-all
21+
22+
jobs:
23+
test:
24+
uses: ./.github/workflows/flutter_vm.yaml
25+
with:
26+
working-directory: packages/amplify_datastore_plugin_interface
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: amplify_flutter
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- stable
7+
pull_request:
8+
paths:
9+
- 'packages/amplify/amplify_flutter/**/*.dart'
10+
- 'packages/amplify/amplify_flutter/**/*.yaml'
11+
- 'packages/amplify/amplify_flutter/lib/**/*'
12+
- 'packages/amplify/amplify_flutter/test/**/*'
13+
- '.github/workflows/flutter_vm.yaml'
14+
- '.github/workflows/amplify_flutter.yaml'
15+
schedule:
16+
- cron: "0 0 * * 0" # Every Sunday at 00:00
17+
defaults:
18+
run:
19+
shell: bash
20+
permissions: read-all
21+
22+
jobs:
23+
test:
24+
uses: ./.github/workflows/flutter_vm.yaml
25+
with:
26+
working-directory: packages/amplify/amplify_flutter
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: amplify_storage_s3
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- stable
7+
pull_request:
8+
paths:
9+
- 'packages/storage/amplify_storage_s3/**/*.dart'
10+
- 'packages/storage/amplify_storage_s3/**/*.yaml'
11+
- 'packages/storage/amplify_storage_s3/lib/**/*'
12+
- 'packages/storage/amplify_storage_s3/test/**/*'
13+
- '.github/workflows/flutter_vm.yaml'
14+
- '.github/workflows/amplify_storage_s3.yaml'
15+
schedule:
16+
- cron: "0 0 * * 0" # Every Sunday at 00:00
17+
defaults:
18+
run:
19+
shell: bash
20+
permissions: read-all
21+
22+
jobs:
23+
test:
24+
uses: ./.github/workflows/flutter_vm.yaml
25+
with:
26+
working-directory: packages/storage/amplify_storage_s3
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Flutter Format and Analyze
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- stable
7+
pull_request:
8+
paths:
9+
- 'packages/**/*.dart'
10+
- 'packages/**/*.yaml'
11+
- '.github/workflows/flutter_format_analyze.yaml'
12+
schedule:
13+
- cron: "0 0 * * 0" # Every Sunday at 00:00
14+
defaults:
15+
run:
16+
shell: bash
17+
permissions: read-all
18+
19+
jobs:
20+
flutter_format_analyze:
21+
runs-on: ubuntu-latest
22+
timeout-minutes: 60
23+
steps:
24+
- name: Git Checkout
25+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # 3.1.0
26+
27+
- name: Setup Flutter
28+
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d # 2.8.0
29+
with:
30+
cache: true
31+
32+
- name: Install Melos and Bootstrap
33+
id: bootstrap
34+
timeout-minutes: 10
35+
run: |
36+
flutter pub global activate melos 1.3.0
37+
melos bootstrap
38+
39+
- name: Flutter Format
40+
if: "always() && steps.bootstrap.conclusion == 'success'"
41+
run: melos run format
42+
43+
- name: Flutter Analyze
44+
if: "always() && steps.bootstrap.conclusion == 'success'"
45+
run: melos run analyze --no-select

0 commit comments

Comments
 (0)