-
Notifications
You must be signed in to change notification settings - Fork 20
143 lines (116 loc) · 4.19 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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: CI
on:
pull_request:
types:
- opened
- synchronize
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
flutter: '3.x'
ios-simulator: iPhone 15
jobs:
authorize:
name: Authorize
environment: ${{ github.event.pull_request.head.repo.fork && 'external' || 'internal' }}
runs-on: ubuntu-latest
steps:
- run: true
analyze-dart:
name: Analyze Dart code
needs: authorize
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Install Flutter
uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
with:
flutter-version: ${{ env.flutter }}
channel: stable
cache: true
- name: Add sample/.env
working-directory: sample
run: cp .env.example .env
- name: Run Dart analyzer
working-directory: sample
run: flutter analyze
test-dart:
name: Test Dart code
needs: authorize
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Install Flutter
uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
with:
flutter-version: ${{ env.flutter }}
channel: stable
cache: true
- name: Add sample/.env
working-directory: sample
run: cp .env.example .env
- name: Run Dart tests
working-directory: sample
run: flutter test
test-ios-smoke:
name: Run native iOS smoke tests using Xcode ${{ matrix.xcode }}
needs: authorize
runs-on: macos-13-large
environment: ${{ github.event.pull_request.head.repo.fork && 'external' || 'internal' }}
env:
platform: iOS
USER_EMAIL: ${{ secrets.USER_EMAIL }}
USER_PASSWORD: ${{ secrets.USER_PASSWORD }}
strategy:
matrix:
xcode:
- '15.0.1'
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Set up environment
uses: ./.github/actions/setup-darwin
with:
platform: ${{ env.platform }}
flutter: ${{ env.flutter }}
xcode: ${{ matrix.xcode }}
auth0-domain: ${{ vars.AUTH0_DOMAIN }}
auth0-client-id: ${{ vars.AUTH0_CLIENT_ID }}
- name: Run iOS smoke tests
uses: ./.github/actions/smoke-tests-darwin
with:
platform: ${{ env.platform }}
destination: 'platform=iOS Simulator,name=iPhone 15'
test-macos-smoke:
name: Run native macOS smoke tests using Xcode ${{ matrix.xcode }}
needs: authorize
runs-on: macos-13
environment: ${{ github.event.pull_request.head.repo.fork && 'external' || 'internal' }}
env:
platform: macOS
USER_EMAIL: ${{ secrets.USER_EMAIL }}
USER_PASSWORD: ${{ secrets.USER_PASSWORD }}
strategy:
matrix:
xcode:
- '15.0.1'
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Set up environment
uses: ./.github/actions/setup-darwin
with:
platform: ${{ env.platform }}
flutter: ${{ env.flutter }}
xcode: ${{ matrix.xcode }}
auth0-domain: ${{ vars.AUTH0_DOMAIN }}
auth0-client-id: ${{ vars.AUTH0_CLIENT_ID }}
- name: Run macOS smoke tests
uses: ./.github/actions/smoke-tests-darwin
with:
platform: ${{ env.platform }}
destination: platform=macOS,arch=x86_64