-
Notifications
You must be signed in to change notification settings - Fork 276
Expand file tree
/
Copy pathamplify_analytics_pinpoint_canary.yaml
More file actions
95 lines (83 loc) · 3.19 KB
/
amplify_analytics_pinpoint_canary.yaml
File metadata and controls
95 lines (83 loc) · 3.19 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# CANARY WORKFLOW
# This is a minimal weekly test for Analytics (Pinpoint).
# Runs every Monday at 6am PST.
# For comprehensive testing, see amplify_analytics_pinpoint_example.yaml
# Platform coverage: Android 35 only (stable channel only)
name: Analytics Canary
on:
pull_request:
paths:
- ".github/workflows/amplify_analytics_pinpoint_canary.yaml"
schedule:
# Weekly on Monday at 6am PST (13:00 UTC)
- cron: "0 13 * * 1"
workflow_dispatch:
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
# Cancels in-progress job when there is another push to same ref.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
e2e-android:
runs-on: ubuntu-latest
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
strategy:
fail-fast: false
matrix:
channel:
- "stable"
flutter-version:
- "any" # latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # 4.0.0
with:
persist-credentials: false
submodules: true
- name: Install dependencies
uses: ./.github/composite_actions/install_dependencies
with:
channel: ${{ matrix.channel }}
flutter-version: ${{ matrix.flutter-version }}
- uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 5.0.0
with:
distribution: "corretto" # Amazon Corretto Build of OpenJDK
java-version: "17"
# Must be run before `fetch_backends` so that `pubspec.lock` is present.
- name: Pub Upgrade
working-directory: canaries
run: flutter pub upgrade
- name: Fetch Amplify backend configurations
uses: ./.github/composite_actions/fetch_backends
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
scope: amplified_todo
secret-identifier: ${{ secrets.AWS_SECRET_IDENTIFIER }}
- name: Run Analytics Canary (Android)
timeout-minutes: 45
uses: ./.github/composite_actions/launch_android_emulator
with:
# Perform a build to reduce startup time of `flutter test` and prevent timeout
script: cd canaries && flutter build apk --debug && flutter test -d emulator-5554 integration_test/main_test.dart
- name: Log success/failure
if: always()
uses: ./.github/composite_actions/log_cw_metric_wrapper
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
job-status: ${{ job.status }}
github-token: ${{ secrets.GITHUB_TOKEN }}
test-type: canary
working-directory: canaries
framework: flutter
flutter-dart-channel: ${{ matrix.channel }}
flutter-version: ${{ matrix.flutter-version }}
platform: android
platform-version: "35"