Skip to content

Commit b35f3ca

Browse files
committed
Different setup
1 parent f58f94c commit b35f3ca

File tree

6 files changed

+60
-102
lines changed

6 files changed

+60
-102
lines changed
Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1+
inputs:
2+
app-name:
3+
description: 'The name of the Android app to test, e.g., JetNews or JetLagged'
4+
required: true
5+
16
runs:
27
using: "composite"
38
steps:
4-
- uses: actions/checkout@v4
5-
- uses: coursier/cache-action@v6
6-
- name: Set Env variables
9+
- name: Run instrumentation tests
710
run: |
8-
echo "ANDROID_HOME=$HOME/.android/sdk" >> $GITHUB_ENV
9-
echo "ANDROID_SDK_ROOT=$HOME/.android/sdk" >> $GITHUB_ENV
10-
echo "ANDROID_USER_HOME=$HOME/.android/" >> $GITHUB_ENV
11+
./mill show ${{ inputs.app-name }}.app.androidApk
12+
./mill show ${{ inputs.app-name }}.app.createAndroidVirtualDevice
13+
./mill --debug show ${{ inputs.app-name }}.app.startAndroidEmulator
14+
./mill show ${{ inputs.app-name }}.app.androidTest
15+
./mill show ${{ inputs.app-name }}.app.stopAndroidEmulator
1116
shell: bash
1217

13-
- name: Enable KVM group perms
14-
run: |
15-
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
16-
sudo udevadm control --reload-rules
17-
sudo udevadm trigger --name-match=kvm
18-
shell: bash
18+
- name: Upload test reports
19+
uses: actions/upload-artifact@v4
20+
with:
21+
name: test-reports-jetnews
22+
path: out/${{ inputs.app-name }}/app/androidTest/testForked.dest/test-report.xml
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
runs:
2+
using: "composite"
3+
steps:
4+
- uses: coursier/cache-action@v6
5+
- name: Set Env variables
6+
run: |
7+
echo "ANDROID_HOME=$HOME/.android/sdk" >> $GITHUB_ENV
8+
echo "ANDROID_SDK_ROOT=$HOME/.android/sdk" >> $GITHUB_ENV
9+
echo "ANDROID_USER_HOME=$HOME/.android/" >> $GITHUB_ENV
10+
shell: bash
11+
12+
- name: Enable KVM group perms
13+
run: |
14+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
15+
sudo udevadm control --reload-rules
16+
sudo udevadm trigger --name-match=kvm
17+
shell: bash

.github/workflows/JetLagged.yaml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/JetNews.yaml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/Jetsnack.yaml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/Test.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Test Apps
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
androidTest:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 30
13+
steps:
14+
- uses: coursier/cache-action@v6
15+
- uses: actions/checkout@v4
16+
- uses: ./.github/actions/android-setup
17+
with:
18+
app-name: JetLagged
19+
- uses: ./.github/actions/android-setup
20+
with:
21+
app-name: JetNews
22+
- uses: ./.github/actions/android-setup
23+
with:
24+
app-name: Jetsnack
25+
- uses: ./.github/actions/mill-android-test
26+
27+

0 commit comments

Comments
 (0)