This repository has been archived by the owner on Aug 13, 2024. It is now read-only.
enable static code analysis #130
Workflow file for this run
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
# Action ti build the current apk | ||
name: Build APK | ||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
# install jdk | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 17 | ||
# Write API key into build config | ||
- name: Write API key into build config | ||
env: | ||
API_TOKEN: ${{ secrets.API_KEY }} | ||
run: echo apiKey=$API_TOKEN > Ladefuchs/secrets.properties | ||
# Build the android apk | ||
- name: Build fw | ||
working-directory: Ladefuchs | ||
run: | | ||
./gradlew build | ||
# Upload apk to artifact | ||
- name: Upload apk | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: APKs | ||
path: | | ||
Ladefuchs/app/build/outputs/apk/debug/app-debug.apk | ||
Ladefuchs/app/build/outputs/apk/release/app-release-unsigned.apk | ||
testing: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 17 | ||
- name: Write API key into build config | ||
env: | ||
API_TOKEN: ${{ secrets.API_KEY }} | ||
run: echo apiKey=$API_TOKEN > Ladefuchs/secrets.properties | ||
- name: Build fw | ||
working-directory: Ladefuchs | ||
run: | | ||
./gradlew koverXmlReport | ||
- name: Upload test reports | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: tests | ||
path: Ladefuchs/build/reports | ||
- name: Add coverage report to PR | ||
uses: mi-kas/kover-report@v1 | ||
with: | ||
path: ${{ github.workspace }}/Ladefuchs/build/reports/kover/result.xml | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
title: App Coverage | ||
update-comment: true | ||
min-coverage-overall: 20 | ||
min-coverage-changed-files: 50 |