2024-11-23 14:19:29 +00:00
name : Build
on :
workflow_call :
jobs :
2024-12-30 14:42:34 +00:00
BuildAndTestAndCoverage :
2024-11-23 14:19:29 +00:00
runs-on : ubuntu-latest
steps :
- name : Check out repository code
uses : actions/checkout@v4
with :
fetch-depth : 0
- name : Fetch tags
run : git fetch --tags -p
- uses : actions/setup-java@v4
with :
distribution : 'temurin'
java-version : '17'
2024-12-30 14:42:34 +00:00
cache : gradle
- uses : gradle/actions/setup-gradle@v3
- uses : android-actions/setup-android@v3
2024-11-23 14:19:29 +00:00
- name : Configure gradle...
2024-12-29 20:35:12 +00:00
run : mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true" >> ~/.gradle/gradle.properties
2024-11-23 14:19:29 +00:00
- name : Build and test
2024-12-30 14:42:34 +00:00
run : ./gradlew build -x testReleaseUnitTest -x testDebugUnitTest -x testGithubConfigReleaseUnitTest -x testGithubConfigDebugUnitTest # These tests will be done
- uses : KengoTODA/actions-setup-docker-compose@v1
with :
version : "2.23.3"
- name : run selfoss
run : |
docker compose -f .gitea/workflows/assets/docker-compose.yml up -d
- name : coverage
run : |
./gradlew :koverHtmlReport
- uses : actions/upload-artifact@v3
with :
name : coverage
path : build/reports/kover/html
retention-days : 1
overwrite : true
include-hidden-files : true
- name : Clean
if : always()
run : |
docker compose -f .gitea/workflows/assets/docker-compose.yml stop