chore: add test pipeline #8085
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
name: build feature branches | |
on: | |
push: | |
branches-ignore: | |
- master | |
- 1.* | |
- 2.* | |
pull_request: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: free disk space | |
continue-on-error: true | |
run: | | |
df -h | |
sudo swapoff -a | |
sudo rm -f /swapfile | |
sudo apt clean | |
docker rmi $(docker image ls -aq) | |
df -h | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
server-id: oss.sonatype.org | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
# since we also build on Windows Powershell, we need to add a space between -D maven.javadoc.skip=true | |
# otherwise the build will fail https://stackoverflow.com/questions/38051787/maven-javadoc-skip-true-throws-an-error | |
- name: Build with Maven | |
run: | | |
mvn -B verify -P coverage --no-transfer-progress -D maven.javadoc.skip=true | |
- name: Publish SNAPSHOT package | |
run: mvn -B deploy --no-transfer-progress -P central-deploy -DskipTests=true | |
env: | |
#TODO: This is a workaround for NEXUS-27902 which uses XStream that fails on JVM >16 | |
JDK_JAVA_OPTIONS: "--add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED" | |
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | |
- uses: codecov/codecov-action@v5 | |
with: | |
files: "'*/jacoco.xml'" |