Skip to content

Commit

Permalink
SONARPY-2475 split ruling into two
Browse files Browse the repository at this point in the history
  • Loading branch information
Seppli11 committed Dec 17, 2024
1 parent d53b19b commit 18c3c71
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
26 changes: 25 additions & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,30 @@ ruling_task:
- source cirrus-env QA
- source set_maven_build_version $BUILD_NUMBER
- cd its/ruling
- mvn verify -Dsonar.runtimeVersion=LATEST_RELEASE -Dmaven.test.redirectTestOutputToFile=false -B -e -V -Dtest=PythonRulingTest -Djunit.jupiter.execution.parallel.config.dynamic.factor=1
- mvn verify -Dsonar.runtimeVersion=LATEST_RELEASE -Dmaven.test.redirectTestOutputToFile=false -B -e -V -Dtest=PythonRulingTest -Djunit.jupiter.execution.parallel.config.dynamic.factor=1 -DexcludedGroups=big-it-project
cleanup_before_cache_script: cleanup_maven_repository

ruling_big_task:
depends_on:
- build
<<: *ONLY_SONARSOURCE_QA
eks_container:
<<: *QA_CONTAINER_DEFINITION
cpu: 4
memory: 16G
env:
CIRRUS_CLONE_DEPTH: 10
SONARSOURCE_QA: true
maven_cache:
folder: ${CIRRUS_WORKING_DIR}/.m2/repository
<<: *ORCHESTRATOR_CACHE_DEFINITION
submodules_script:
- git submodule update --init
ruling_script:
- source cirrus-env QA
- source set_maven_build_version $BUILD_NUMBER
- cd its/ruling
- mvn verify -Dsonar.runtimeVersion=LATEST_RELEASE -Dmaven.test.redirectTestOutputToFile=false -B -e -V -Dtest=PythonRulingTest -Djunit.jupiter.execution.parallel.config.dynamic.factor=1 -Dgroups=big-it-project
cleanup_before_cache_script: cleanup_maven_repository

pr_analysis_qa_task:
Expand Down Expand Up @@ -230,6 +253,7 @@ promote_task:
depends_on:
- test_analyze
- ruling
- ruling_big
- plugin_qa
- ws_scan
- pr_analysis_qa
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.nio.file.Files;
import java.util.Collections;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.junit.jupiter.api.parallel.Execution;
Expand All @@ -40,7 +41,6 @@
@Execution(ExecutionMode.CONCURRENT)
class PythonRulingTest {


@RegisterExtension
public static final OrchestratorExtension ORCHESTRATOR = getOrchestrator();
public static final Configuration CONFIGURATION = ORCHESTRATOR.getConfiguration();
Expand All @@ -65,6 +65,7 @@ static void install_sonar_scanner() {
}

@Test
@Tag("big-it-project")
void test_airflow() throws IOException {
SonarScanner build = buildWithCommonProperties("airflow");
build.setProperty("sonar.sources", "airflow");
Expand Down Expand Up @@ -167,6 +168,7 @@ void test_docker_compose() throws IOException {
}

@Test
@Tag("big-it-project")
void test_indico() throws IOException {
SonarScanner build = buildWithCommonProperties("indico");
build.setProperty("sonar.sources", "indico");
Expand Down Expand Up @@ -229,6 +231,7 @@ void test_saleor() throws IOException {
}

@Test
@Tag("big-it-project")
void test_salt() throws IOException {
SonarScanner build = buildWithCommonProperties("salt");
// salt is not actually a Python 3.12 project. This is to ensure analysis is performed correctly when the parameter is set.
Expand All @@ -252,6 +255,7 @@ void test_specific_rules() throws IOException {
}

@Test
@Tag("big-it-project")
void test_tensorflow() throws IOException {
SonarScanner build = buildWithCommonProperties("tensorflow");
build.setProperty("sonar.sources", "python");
Expand Down

0 comments on commit 18c3c71

Please sign in to comment.