-
Notifications
You must be signed in to change notification settings - Fork 143
155 lines (130 loc) · 4.22 KB
/
e2e.yaml
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
144
145
146
147
148
149
150
151
152
153
154
155
name: e2e
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-e2e
cancel-in-progress: true
on:
workflow_dispatch:
schedule:
# At the end of every day
- cron: "0 0 * * *"
env:
SHOREBIRD_TOKEN: ${{ secrets.SHOREBIRD_TOKEN }}
FLUTTER_VERSION: 3.24.4
jobs:
patch:
strategy:
fail-fast: false
matrix:
flutter-version: [3.24.1, 3.24.0, 3.22.3, 3.22.2, 3.19.6]
runs-on: ubuntu-latest
timeout-minutes: 15
env:
SHOREBIRD_HOSTED_URL: https://api-dev.shorebird.dev
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: 🖥️ Add Shorebird to PATH
shell: bash
run: echo "${GITHUB_WORKSPACE}/bin/" >> $GITHUB_PATH
- name: 🐦 Verify Shorebird Installation
run: |
if [[ $(shorebird --version) =~ "Engine • revision" ]]; then
echo '✅ Shorebird CLI is installed!'
else
echo '❌ Shorebird CLI is not installed.'
exit 1
fi
shell: bash
- name: ☕ Set up Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- name: 🎯 Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: ${{ matrix.flutter-version }}
cache: true
- name: 🤖 AVD Cache
uses: actions/cache@v4
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-29
- name: 🤖 Cache AVD Snapshot
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
arch: x86_64
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD Snapshot"
- name: 🧪 Run Patch E2E Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
arch: x86_64
script: ./scripts/patch_e2e.sh ${{ matrix.flutter-version }}
cli:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
branch: [stable, main]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
env:
SHOREBIRD_HOSTED_URL: ${{ matrix.branch == 'stable' && 'https://api.shorebird.dev' || 'https://api-dev.shorebird.dev' }}
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
- name: 🖥️ Add Shorebird to macOS/Linux PATH
shell: bash
if: runner.os != 'Windows'
run: echo "${GITHUB_WORKSPACE}/bin/" >> $GITHUB_PATH
- name: 🖥️ Add Shorebird to Windows PATH
shell: pwsh
if: runner.os == 'Windows'
run: Add-Content $env:GITHUB_PATH "${env:GITHUB_WORKSPACE}\bin"
- name: 🐦 Verify Shorebird Installation (macOS / Linux)
if: runner.os != 'Windows'
run: |
if [[ $(shorebird --version) =~ "Engine • revision" ]]; then
echo '✅ Shorebird CLI is installed!'
else
echo '❌ Shorebird CLI is not installed.'
exit 1
fi
shell: bash
- name: 🐦 Verify Shorebird Installation (Windows)
if: runner.os == 'Windows'
run: |
$shorebird_version = shorebird --version
if ($shorebird_version -match "Engine") {
Write-Output "✅ Shorebird CLI is installed!"
} else {
Write-Output "❌ Shorebird CLI is not installed."
exit 1
}
shell: pwsh
- name: ☕ Set up Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- name: 🎯 Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: 🧪 Run Integration Tests
run: dart test integration_test
working-directory: packages/shorebird_cli