make returned list unmodifiable and rename constant #2555 #3674
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
# SPDX-License-Identifier: MIT | |
name: Java & Go CI | |
on: | |
push: | |
branches-ignore: | |
# we do NOT build the documentation branch, because here we only copy build output | |
# of documentation from master branch to the corresponding doc folders -e.g. /docs/latest | |
# So this branch is only for github pages. See https://github.com/mercedes-benz/sechub/issues/481 | |
# for details | |
- documentation | |
# We ignore everything where tag starts with v* - this is done by release build! | |
tags-ignore: | |
- v* | |
# enable manual triggering of workflow | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: temurin | |
cache: gradle | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.20.4 | |
- uses: actions/[email protected] | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Gradle clean + spotlessCheck | |
run: ./gradlew clean spotlessCheck | |
- name: Build Client | |
run: ./gradlew :sechub-cli:buildGo :sechub-cli:testGo | |
- name: Build Server, DAUI and generate OpenAPI file | |
run: ./gradlew ensureLocalhostCertificate build generateOpenapi buildDeveloperAdminUI -x :sechub-cli:build | |
- name: Generate and build Java projects related to SecHub Java API | |
run: ./gradlew :sechub-api-java:build :sechub-systemtest:build :sechub-pds-tools:buildPDSToolsCLI -Dsechub.build.stage=api-necessary | |
# Integration test | |
- name: Integration test | |
run: ./gradlew :sechub-integrationtest:startIntegrationTestInstances :sechub-systemtest:integrationtest :sechub-integrationtest:integrationtest :sechub-integrationtest:stopIntegrationTestInstances -Dsechub.build.stage=all --console=plain | |
# We use 'if: always()' to run a step even if a previous step failed | |
- name: Create combined test report | |
if: always() | |
run: ./gradlew createCombinedTestReport -Dsechub.build.stage=all | |
# ----------------------------------------- | |
# Upload Build Artifacts | |
# ----------------------------------------- | |
- name: Archive combined test report | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: combined-sechub-testreport | |
path: build/reports/combined-report | |
retention-days: 14 | |
- name: Archive sechub server artifacts | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sechub-server | |
path: sechub-server/build/libs | |
retention-days: 14 | |
- name: Archive pds server artifacts | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sechub-pds | |
path: sechub-pds/build/libs | |
- name: Archive pds tools artifacts | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sechub-pds-tools | |
path: sechub-pds-tools/build/libs | |
- name: Archive developer tools artifacts | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sechub-developertools | |
path: sechub-developertools/build/libs | |
retention-days: 14 | |
- name: Archive sechub client artifacts | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sechub-client | |
path: sechub-cli/build/go | |
retention-days: 14 | |
- name: Install graphviz (asciidoc diagrams) | |
run: sudo apt-get -qq --assume-yes install graphviz | |
# ----------------------------------------- | |
# Build Documentation | |
# ----------------------------------------- | |
- name: Create documentation | |
run: ./gradlew documentation -Dsechub.build.stage=all | |
# ----------------------------------------- | |
# Upload documentation | |
# ----------------------------------------- | |
- name: Archive documentation HTML | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sechub-docs-html | |
path: sechub-doc/build/docs/final-html/ | |
retention-days: 14 | |
- name: Archive documentation PDF | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sechub-docs-pdf | |
path: sechub-doc/build/docs/asciidoc/*.pdf | |
retention-days: 14 | |
- name: Archive documentation openAPI3 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sechub-api-spec | |
path: sechub-doc/build/api-spec/ | |
retention-days: 14 |