48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
name: build-and-test
|
|
|
|
on:
|
|
- pull_request
|
|
- push
|
|
|
|
jobs:
|
|
build:
|
|
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 jar javadocJar sourceJar
|
|
- name: Upload library JARs
|
|
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
|
with:
|
|
name: library-jars
|
|
path: |
|
|
**/build/libs/*.jar
|
|
!**/build/libs/*-javadoc.jar
|
|
!**/build/libs/*-source.jar
|
|
if-no-files-found: error
|
|
- name: Upload API documentation JARs
|
|
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
|
with:
|
|
name: apidoc-jars
|
|
path: |
|
|
**/build/libs/*-javadoc.jar
|
|
if-no-files-found: error
|
|
- name: Upload source JARs
|
|
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
|
with:
|
|
name: source-jars
|
|
path: |
|
|
**/build/libs/*-source.jar
|
|
if-no-files-found: error
|
|
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
|