-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Android lint & test to GitHub CI
This commit implements the Android Lint and Tests into the pipeline to check if everything is ok at least with the written unit tests. Closes #6678
- Loading branch information
1 parent
7fa3626
commit 08ecd3c
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Kotlin CI | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- master | ||
paths: [ "app-android/**" ] | ||
|
||
jobs: | ||
test-kotlin: | ||
runs-on: ubuntu-latest | ||
env: | ||
java-version: 21 | ||
java-distribution: 'temurin' | ||
node-version: 20.11.1 | ||
TZ: "Europe/Berlin" | ||
permissions: | ||
actions: none | ||
checks: none | ||
contents: read | ||
deployments: none | ||
id-token: none | ||
issues: none | ||
discussions: none | ||
packages: none | ||
pages: none | ||
pull-requests: none | ||
repository-projects: none | ||
security-events: none | ||
statuses: none | ||
|
||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 | ||
- name: Use Node.js ${{ env.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.node-version }} | ||
cache: 'npm' | ||
cache-dependency-path: '**/package-lock.json' | ||
- name: Get better-sqlite3 cached location | ||
run: | | ||
echo "better_sqlite3_path=$(node buildSrc/getNativeCacheLocation.js better-sqlite3)" >> $GITHUB_ENV | ||
- name: Try to use cached better-sqlite3 | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.better_sqlite3_path }} | ||
key: ${{ env.better_sqlite3_path }} | ||
- name: Install packages | ||
run: npm ci && npm run build-packages | ||
- name: Build WebApp | ||
run: node webapp | ||
- name: Set up JDK ${{ env.java-version }} | ||
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #4.2.1 | ||
with: | ||
java-version: ${{ env.java-version }} | ||
distribution: ${{ env.java-distribution }} | ||
- name: Setup Android SDK | ||
uses: android-actions/setup-android@07976c6290703d34c16d382cb36445f98bb43b1f #3.2.0 | ||
- name: Lint | ||
working-directory: ./app-android | ||
run: ./gradlew lint --quiet | ||
- name: Test | ||
working-directory: ./app-android | ||
run: ./gradlew test |