-
Notifications
You must be signed in to change notification settings - Fork 147
81 lines (68 loc) · 2.24 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
name: e2e
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
schedule:
# At the end of every day
- cron: "0 0 * * *"
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
package: [packages/shorebird_cli]
branch: [stable, main]
runs-on: ${{ matrix.os }}
env:
SHOREBIRD_TOKEN: ${{ secrets.SHOREBIRD_TOKEN }}
SHOREBIRD_HOSTED_URL: ${{ matrix.branch == 'stable' && 'https://api.shorebird.dev' || 'https://api-dev.shorebird.dev' }}
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v3
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@v3
with:
distribution: "temurin"
java-version: "17"
- name: 🎯 Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.10.6
- name: 🧪 Run Integration Tests
run: dart test integration_test
working-directory: ${{ matrix.package }}