2024-08-18 16:51:38 +02:00
|
|
|
name: build-and-test
|
2024-08-18 14:06:25 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
- pull_request
|
|
|
|
- push
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2024-08-18 14:17:13 +02:00
|
|
|
runs-on: docker
|
2024-08-18 14:06:25 +02:00
|
|
|
container:
|
2024-08-18 17:01:28 +02:00
|
|
|
image: git.staropensource.de/staropensource/actions-docker:java
|
2024-08-18 14:06:25 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: https://code.forgejo.org/actions/checkout@v4
|
|
|
|
- name: Compile
|
2024-08-18 17:01:49 +02:00
|
|
|
run: ./gradlew --no-daemon jar javadocJar sourceJar
|
2024-08-18 14:16:23 +02:00
|
|
|
- name: Upload library JARs
|
2024-08-18 14:06:25 +02:00
|
|
|
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: library-jars
|
|
|
|
path: |
|
|
|
|
**/build/libs/*.jar
|
|
|
|
!**/build/libs/*-javadoc.jar
|
2024-08-18 17:30:15 +02:00
|
|
|
!**/build/libs/*-sources.jar
|
2024-08-18 14:06:25 +02:00
|
|
|
if-no-files-found: error
|
2024-08-18 14:16:23 +02:00
|
|
|
- name: Upload API documentation JARs
|
2024-08-18 14:06:25 +02:00
|
|
|
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: apidoc-jars
|
|
|
|
path: |
|
|
|
|
**/build/libs/*-javadoc.jar
|
|
|
|
if-no-files-found: error
|
2024-08-18 14:16:23 +02:00
|
|
|
- name: Upload source JARs
|
2024-08-18 14:06:25 +02:00
|
|
|
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: source-jars
|
|
|
|
path: |
|
2024-08-18 17:30:15 +02:00
|
|
|
**/build/libs/*-sources.jar
|
2024-08-18 14:06:25 +02:00
|
|
|
if-no-files-found: error
|
2024-08-18 17:47:55 +02:00
|
|
|
generate-javadoc:
|
|
|
|
runs-on: docker
|
|
|
|
container:
|
|
|
|
image: git.staropensource.de/staropensource/actions-docker:java
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: https://code.forgejo.org/actions/checkout@v4
|
|
|
|
- name: Compile
|
|
|
|
run: ./gradlew --no-daemon javadoc javadocAll
|
|
|
|
- name: Upload separate javadoc
|
|
|
|
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: javadoc-separate
|
|
|
|
path: |
|
|
|
|
**/build/docs/javadoc/*
|
|
|
|
if-no-files-found: error
|
|
|
|
- name: Upload combined javadoc
|
|
|
|
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: javadoc-combined
|
|
|
|
path: |
|
|
|
|
/build/docs/javadoc/*
|
|
|
|
if-no-files-found: error
|
2024-08-18 17:01:49 +02:00
|
|
|
test:
|
|
|
|
runs-on: docker
|
|
|
|
container:
|
|
|
|
image: git.staropensource.de/staropensource/actions-docker:java
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: https://code.forgejo.org/actions/checkout@v4
|
|
|
|
- name: Run tests
|
|
|
|
run: ./gradlew --no-daemon test
|