Skip to content

Commit 40a5db1

Browse files
authored
ci(android): Update Android CI to be compatible with cordova-android@13 (#890)
1 parent 9eecbaa commit 40a5db1

File tree

1 file changed

+34
-10
lines changed

1 file changed

+34
-10
lines changed

.github/workflows/android.yml

+34-10
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ on:
2323
- '**.md'
2424
- 'LICENSE'
2525
- '.eslint*'
26+
2627
pull_request:
2728
paths-ignore:
2829
- '**.md'
@@ -32,20 +33,20 @@ on:
3233
jobs:
3334
test:
3435
name: Android ${{ matrix.versions.android }} Test
35-
runs-on: macos-latest
36+
runs-on: ubuntu-latest
3637
continue-on-error: true
3738

3839
# hoist configurations to top that are expected to be updated
3940
env:
4041
# Storing a copy of the repo
4142
repo: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
4243

43-
node-version: 16
44+
node-version: 20
4445

4546
# These are the default Java configurations used by most tests.
4647
# To customize these options, add "java-distro" or "java-version" to the strategy matrix with its overriding value.
4748
default_java-distro: temurin
48-
default_java-version: 11
49+
default_java-version: 17
4950

5051
# These are the default Android System Image configurations used by most tests.
5152
# To customize these options, add "system-image-arch" or "system-image-target" to the strategy matrix with its overriding value.
@@ -56,38 +57,61 @@ jobs:
5657
strategy:
5758
matrix:
5859
versions:
59-
# Test the lowest minimum supported APIs
6060
- android: 7
6161
android-api: 24
6262

63-
# Test the last 3-4 supported APIs
63+
- android: 7.1
64+
android-api: 25
65+
66+
- android: 8
67+
android-api: 26
68+
69+
- android: 8.1
70+
android-api: 27
71+
system-image-arch: x86
72+
73+
- android: 9
74+
android-api: 28
75+
6476
- android: 10
6577
android-api: 29
6678

6779
- android: 11
6880
android-api: 30
6981

82+
- android: 12
83+
android-api: 31
84+
7085
- android: 12L
7186
android-api: 32
7287

7388
- android: 13
7489
android-api: 33
7590

91+
- android: 14
92+
android-api: 34
93+
7694
timeout-minutes: 60
7795

7896
steps:
79-
- uses: actions/checkout@v3
80-
- uses: actions/setup-node@v3
97+
- uses: actions/checkout@v4
98+
- uses: actions/setup-node@v4
8199
with:
82100
node-version: ${{ env.node-version }}
83-
- uses: actions/setup-java@v3
101+
- uses: actions/setup-java@v4
84102
env:
85103
java-version: ${{ matrix.versions.java-version == '' && env.default_java-version || matrix.versions.java-version }}
86104
java-distro: ${{ matrix.versions.java-distro == '' && env.default_java-distro || matrix.versions.java-distro }}
87105
with:
88106
distribution: ${{ env.java-distro }}
89107
java-version: ${{ env.java-version }}
90108

109+
- name: Enable KVM group perms
110+
run: |
111+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
112+
sudo udevadm control --reload-rules
113+
sudo udevadm trigger --name-match=kvm
114+
91115
- name: Run Environment Information
92116
run: |
93117
node --version
@@ -105,7 +129,7 @@ jobs:
105129
if: ${{ endswith(env.repo, '/cordova-paramedic') != true }}
106130
run: npm i -g github:apache/cordova-paramedic
107131

108-
- uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b
132+
- uses: reactivecircus/android-emulator-runner@v2
109133
env:
110134
system-image-arch: ${{ matrix.versions.system-image-arch == '' && env.default_system-image-arch || matrix.versions.system-image-arch }}
111135
system-image-target: ${{ matrix.versions.system-image-target == '' && env.default_system-image-target || matrix.versions.system-image-target }}
@@ -119,7 +143,7 @@ jobs:
119143
script: echo "Pregenerate the AVD before running Paramedic"
120144

121145
- name: Run paramedic tests
122-
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b
146+
uses: reactivecircus/android-emulator-runner@v2
123147
env:
124148
system-image-arch: ${{ matrix.versions.system-image-arch == '' && env.default_system-image-arch || matrix.versions.system-image-arch }}
125149
system-image-target: ${{ matrix.versions.system-image-target == '' && env.default_system-image-target || matrix.versions.system-image-target }}

0 commit comments

Comments
 (0)