Skip to content

Commit 074645e

Browse files
authored
fix: android failing e2e test (#1609)
1 parent 6f86caa commit 074645e

1 file changed

Lines changed: 24 additions & 15 deletions

File tree

.github/workflows/mobile-curriculum-e2e.yml

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- main
88
paths:
99
- "mobile-app/**"
10+
- ".github/**"
1011
push:
1112
branches:
1213
- main
@@ -18,6 +19,14 @@ jobs:
1819
name: Test curriculum for mobile app
1920
runs-on: ubuntu-22.04
2021

22+
strategy:
23+
matrix:
24+
gradle-version: [8.7]
25+
java-version: [17]
26+
android-api-level: [35]
27+
pnpm-version: [10]
28+
flutter-version: ["3.32.x"]
29+
2130
steps:
2231
- name: Remove unused software
2332
working-directory: /
@@ -35,31 +44,31 @@ jobs:
3544
sudo udevadm control --reload-rules
3645
sudo udevadm trigger --name-match=kvm
3746
38-
- name: Gradle cache
47+
- name: Gradle cache - ${{ matrix.gradle-version }}
3948
uses: gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3
4049
with:
41-
gradle-version: 8.7
50+
gradle-version: ${{ matrix.gradle-version }}
4251

43-
- name: Setup Java 17
52+
- name: Setup Java - ${{ matrix.java-version }}
4453
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
4554
with:
4655
distribution: "temurin"
47-
java-version: "17"
56+
java-version: ${{ matrix.java-version }}
4857

49-
- name: AVD cache
58+
- name: AVD cache - ${{ matrix.android-api-level }}
5059
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
5160
id: avd-cache
5261
with:
5362
path: |
5463
~/.android/avd/*
5564
~/.android/adb*
56-
key: avd-34
65+
key: avd-${{ matrix.android-api-level }}
5766

58-
- name: Ceate AVD and generate snapshot for caching
67+
- name: Create AVD and generate snapshot for caching - ${{ matrix.android-api-level }}
5968
if: steps.avd-cache.outputs.cache-hit != 'true'
6069
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # v2
6170
with:
62-
api-level: 34
71+
api-level: ${{ matrix.android-api-level }}
6372
target: google_apis
6473
arch: x86_64
6574
force-avd-creation: false
@@ -78,18 +87,18 @@ jobs:
7887
with:
7988
path: mobile
8089

81-
- name: Setup pnpm
90+
- name: Setup pnpm - ${{ matrix.pnpm-version }}
8291
uses: pnpm/action-setup@v2
8392
with:
84-
version: 10
93+
version: ${{ matrix.pnpm-version }}
8594

86-
- name: Setup Flutter 3.32.x
95+
- name: Setup Flutter - ${{ matrix.flutter-version }}
8796
uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046 # v2
8897
with:
89-
flutter-version: "3.32.x"
98+
flutter-version: ${{ matrix.flutter-version }}
9099
channel: "stable"
91100
cache: true
92-
cache-key: flutter-3.32.x
101+
cache-key: flutter-${{ matrix.flutter-version }}
93102
cache-path: ${{ runner.tool_cache }}/flutter
94103

95104
- name: Set freeCodeCamp Environment Variables
@@ -112,10 +121,10 @@ jobs:
112121
working-directory: mobile/mobile-app
113122
run: flutter pub get
114123

115-
- name: Run curriculum tests in emulator
124+
- name: Run curriculum tests in emulator - ${{ matrix.android-api-level }}
116125
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # v2
117126
with:
118-
api-level: 34
127+
api-level: ${{ matrix.android-api-level }}
119128
target: google_apis
120129
arch: x86_64
121130
force-avd-creation: false

0 commit comments

Comments
 (0)