diff --git a/.github/workflows/linter.yml b/.github/workflows/pull-request-checks.yml
similarity index 50%
rename from .github/workflows/linter.yml
rename to .github/workflows/pull-request-checks.yml
index c38890dd0cd..2407cdc2724 100644
--- a/.github/workflows/linter.yml
+++ b/.github/workflows/pull-request-checks.yml
@@ -15,17 +15,44 @@
# specific language governing permissions and limitations
# under the License.
-name: Lint Code Base
+name: Check Pull Request
on: [pull_request]
jobs:
build:
- name: GitHub Super Linter
+ name: Check Pull Request
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - uses: github/super-linter@v4
+
+ - name: Set up JDK11
+ uses: actions/setup-java@v2
+ with:
+ distribution: 'temurin'
+ java-version: '11'
+ cache: 'maven'
+
+ - name: Install nonoss jar dependencies
+ run: |
+ git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss
+ cd nonoss && bash -x install-non-oss.sh && cd ..
+
+ - name: Run Build and Tests with Coverage
+ run: mvn -P quality -Dsimulator -Dnoredist clean install
+
+ - name: Generate JaCoCo Report
+ uses: Madrapps/jacoco-report@v1.2
+ with:
+ paths: ${{ github.workspace }}/client/target/site/jacoco-aggregate/jacoco.xml
+ token: ${{ secrets.GITHUB_TOKEN }}
+ min-coverage-overall: 0
+ min-coverage-changed-files: 80
+ title: PR Code Coverage
+ debug-mode: true
+
+ - name: SuperLinter Lint Checks
+ uses: github/super-linter@v4
env:
VALIDATE_PYTHON_FLAKE8: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/client/pom.xml b/client/pom.xml
index f2206f103af..b9cbae91b7a 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -1001,5 +1001,31 @@
+
+ quality
+
+
+ quality
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${cs.jacoco-plugin.version}
+
+
+ report-aggregate
+ verify
+
+ report-aggregate
+
+
+
+
+
+
+
diff --git a/plugins/hypervisors/kvm/src/test/java/org/apache/cloudstack/utils/linux/KVMHostInfoTest.java b/plugins/hypervisors/kvm/src/test/java/org/apache/cloudstack/utils/linux/KVMHostInfoTest.java
index 34e154611a6..360f72579a6 100644
--- a/plugins/hypervisors/kvm/src/test/java/org/apache/cloudstack/utils/linux/KVMHostInfoTest.java
+++ b/plugins/hypervisors/kvm/src/test/java/org/apache/cloudstack/utils/linux/KVMHostInfoTest.java
@@ -39,6 +39,9 @@ import org.powermock.modules.junit4.PowerMockRunner;
public class KVMHostInfoTest {
@Test
public void getCpuSpeed() {
+ if (!System.getProperty("os.name").equals("Linux")) {
+ return;
+ }
Assume.assumeTrue(SystemUtils.IS_OS_LINUX);
NodeInfo nodeInfo = Mockito.mock(NodeInfo.class);
nodeInfo.mhz = 1000;
@@ -47,6 +50,9 @@ public class KVMHostInfoTest {
@Test
public void manualCpuSpeedTest() throws Exception {
+ if (!System.getProperty("os.name").equals("Linux")) {
+ return;
+ }
PowerMockito.mockStatic(LibvirtConnection.class);
Connect conn = Mockito.mock(Connect.class);
NodeInfo nodeInfo = Mockito.mock(NodeInfo.class);
diff --git a/pom.xml b/pom.xml
index 530d3c1a09f..760b3ff6f4b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,12 +55,13 @@
11
target
build/replace.properties
+ -Djava.security.egd=file:/dev/./urandom -noverify
1.8
3.0.0
3.1.0
- 0.8.3
+ 0.8.8
3.8.1
3.1.1
2.22.2
@@ -1152,7 +1153,6 @@
${cs.surefire-plugin.version}
false
- -Djava.security.egd=file:/dev/./urandom -noverify