Skip to content

Commit

Permalink
IJMP-1873 Kotlin SDK docs update + license header update + GitHub Act…
Browse files Browse the repository at this point in the history
…ions build workflow

Signed-off-by: Uladzislau <[email protected]>
  • Loading branch information
KUGDev committed Sep 4, 2024
1 parent 8dabecf commit 53b681e
Show file tree
Hide file tree
Showing 136 changed files with 1,539 additions and 249 deletions.
4 changes: 2 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ runs:
using: "composite"
steps:
- name: Set up JDK ${{ inputs.jdkVersion }}
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ inputs.jdkVersion }}
Expand All @@ -21,7 +21,7 @@ runs:
shell: bash

- name: Cache Gradle packages
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build + Test + Sonar

on: [push, workflow_dispatch]

permissions:
contents: read

jobs:
build_and_test:
runs-on: ubuntu-latest
timeout-minutes: 40

steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.ZOWE_ROBOT_TOKEN }}

- uses: ./.github/actions/setup

- name: Build with Gradle
run: ./gradlew build

- name: Prepare lib Artifact
id: artifact
shell: bash
run: |
cd ${{ github.workspace }}/build/libs
FILENAME=`ls | grep -vE '(-javadoc|-sources)\.jar$'`
echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT
echo "zip artifact name:"
echo "$FILENAME"
- name: Publish built lib to artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact.outputs.filename }}
path: ./build/libs/*

- name: Test with Gradle
run: ./gradlew test

- name: Publish tests result to artifacts
uses: actions/upload-artifact@v4
with:
name: tests-report-${{ steps.artifact.outputs.filename }}
path: ${{ github.workspace }}/build/reports/*

- name: Publish results to SonarCloud
run: >
./gradlew --info sonar -Dresults="build/reports/tests/test,build/test-results"
-Psonar.host.url=$SONAR_HOST_URL -Dsonar.token=$SONAR_TOKEN
-Partifactory_user=$ARTIFACTORY_USERNAME -Partifactory_password=$ARTIFACTORY_PASSWORD
-Dsonar.coverage.jacoco.xmlReportPaths="build/reports/jacoco.xml"
env:
ARTIFACTORY_USE RNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: ./.github/actions/teardown
38 changes: 0 additions & 38 deletions .github/workflows/sonar-scan.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
_site
.sass-cache
.jekyll-cache
.jekyll-metadata
vendor
.idea
.idea/*.xml
.idea/*.iml
.idea/modules
Expand Down
Loading

0 comments on commit 53b681e

Please sign in to comment.