abouttreesummaryrefslogcommitdiff
path: root/.github/workflows/make-apk.yml
diff options
context:
space:
mode:
authorJules Aguillon2026-04-18 21:09:55 +0200
committerGitHub2026-04-18 21:09:55 +0200
commit6477c90506f1cafb84cbb2436cd5a83c167ee33f (patch)
treefca0d2b1a9d0a79a3da247ab554acfcb23e2a781 /.github/workflows/make-apk.yml
parentc6774196ea57f30026e4aa7f126a6202f0fdd865 (diff)
downloadunexpected-keyboard-6477c90506f1cafb84cbb2436cd5a83c167ee33f.tar.gz
unexpected-keyboard-6477c90506f1cafb84cbb2436cd5a83c167ee33f.zip
CI: Run the tests (#1245)
Run the tests before building the debug APK in CI. This checks that the unit tests pass and that the generated files are uptodate. Doesn't fail if the generated files are outdated. Instead, the APK is built with them updated.
Diffstat (limited to '.github/workflows/make-apk.yml')
-rw-r--r--.github/workflows/make-apk.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/.github/workflows/make-apk.yml b/.github/workflows/make-apk.yml
index bafcba4..a034de2 100644
--- a/.github/workflows/make-apk.yml
+++ b/.github/workflows/make-apk.yml
@@ -15,6 +15,7 @@ jobs:
uses: actions/checkout@v6
with:
submodules: true
+
- name: Restore debug keystore from GitHub Secrets
run: |
# Check if exist and use the secret named DEBUG_KEYSTORE
@@ -28,12 +29,22 @@ jobs:
gpg -d --passphrase "debug0" --batch "debug.keystore.asc" > "debug.keystore"
fi
fi
+
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
+
+ - name: Run tests
+ run: |
+ gradle test
+ # Warn about outdated generated files.
+ if ! git diff --name-only; then
+ echo "Warning: Generated files are not uptodate. Run 'gradle test'."
+ fi
+
- name: Build debug APK
run: ./gradlew assembleDebug
env:
@@ -41,6 +52,7 @@ jobs:
DEBUG_KEYSTORE_PASSWORD: debug0
DEBUG_KEY_ALIAS: debug
DEBUG_KEY_PASSWORD: debug0
+
- name: Artifact naming
run: |
artifact="${{github.repository_owner}} ${{github.ref_name}}"