This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
132 lines (127 loc) · 3.64 KB
/
ci.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
name: CI
on:
push:
branches:
- main
- develop
- release/*
pull_request:
branches:
- main
- develop
- release/*
workflow_dispatch:
jobs:
build-linux:
name: flutter build linux
runs-on: ubuntu-latest
env:
FLUTTER_VERSION: "3.0.3"
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Create empty token file
run: echo 'const token = "";' > test_app/integration_tests/end_to_end/token.dart
- name: Set up Java 🔧
uses: actions/setup-java@v3
with:
java-version: 15
distribution: 'adopt'
- name: Enable KVM group perms
run: |
sudo apt -y update
sudo apt-get install -y qemu-kvm
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Set up Flutter version 🔧
uses: ./.github/actions/flutter-action
with:
flutter-version: $FLUTTER_VERSION
- name: Fetch dependencies
run: |
flutter pub get
- name: Run tests
run: |
flutter test -r expanded
- name: Run pana analyzer
run: |
./scripts/score_analyzer.sh
- name: Build app
run: |
./scripts/build-android.sh
- name: Analyze
run: |
flutter analyze
build-macos-android:
name: flutter build macos android
runs-on: macos-12
env:
FLUTTER_VERSION: "3.0.3"
ANDROID_SDK_ROOT: "/Users/runner/android-sdk"
ANDROID_HOME: "~/.android"
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: 15
distribution: 'zulu'
- name: Set up Flutter version 🔧
uses: ./.github/actions/flutter-action
with:
flutter-version: $FLUTTER_VERSION
- name: Fetch dependencies
run: |
flutter pub get
- name: Set up android enviroment
run: |
./scripts/macos_setup_android_env.sh
- name: Configure sdkmanager
run: |
./scripts/macos_configure-sdkmanager.sh 32 32.0.0 "android-25;default;x86"
- name: Run android integration tests
run: |
./scripts/run-mocked-integration-tests-android.sh "android-25;default;x86"
build-macos-ios:
name: flutter build macos ios
runs-on: macos-12
env:
FLUTTER_VERSION: "3.0.3"
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Create empty token file
run: echo 'const token = "";' > test_app/integration_tests/end_to_end/token.dart
- name: Set up Flutter version 🔧
uses: ./.github/actions/flutter-action
with:
flutter-version: $FLUTTER_VERSION
- name: Fetch dependencies
run: |
flutter pub get
- name: Run unmocked integration tests
env:
APP_KEY: ${{ secrets.DOLBYIO_APP_KEY }}
URL: ${{ secrets.DOLBYIO_APP_SDK_USER_ACCESS_TOKEN_URL }}
run: |
./scripts/run-end-to-end-tests-ios.rb "${URL}" "${APP_KEY}"
- name: Run mocked integration tests
run: |
./scripts/run-mocked-integration-tests-ios.rb
- name: Analyze
run: |
flutter analyze