Skip to content

Commit ec2df8b

Browse files
committed
SONARPY-2475 split ruling into two
1 parent d53b19b commit ec2df8b

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

.cirrus.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,30 @@ ruling_task:
201201
- source cirrus-env QA
202202
- source set_maven_build_version $BUILD_NUMBER
203203
- cd its/ruling
204-
- mvn verify -Dsonar.runtimeVersion=LATEST_RELEASE -Dmaven.test.redirectTestOutputToFile=false -B -e -V -Dtest=PythonRulingTest -Djunit.jupiter.execution.parallel.config.dynamic.factor=1
204+
- 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
205+
cleanup_before_cache_script: cleanup_maven_repository
206+
207+
ruling_big_task:
208+
depends_on:
209+
- build
210+
<<: *ONLY_SONARSOURCE_QA
211+
eks_container:
212+
<<: *QA_CONTAINER_DEFINITION
213+
cpu: 5
214+
memory: 16G
215+
env:
216+
CIRRUS_CLONE_DEPTH: 10
217+
SONARSOURCE_QA: true
218+
maven_cache:
219+
folder: ${CIRRUS_WORKING_DIR}/.m2/repository
220+
<<: *ORCHESTRATOR_CACHE_DEFINITION
221+
submodules_script:
222+
- git submodule update --init
223+
ruling_script:
224+
- source cirrus-env QA
225+
- source set_maven_build_version $BUILD_NUMBER
226+
- cd its/ruling
227+
- 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
205228
cleanup_before_cache_script: cleanup_maven_repository
206229

207230
pr_analysis_qa_task:
@@ -230,6 +253,7 @@ promote_task:
230253
depends_on:
231254
- test_analyze
232255
- ruling
256+
- ruling_big
233257
- plugin_qa
234258
- ws_scan
235259
- pr_analysis_qa

its/ruling/src/test/java/org/sonar/python/it/PythonRulingTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import java.nio.file.Files;
2828
import java.util.Collections;
2929
import org.junit.jupiter.api.BeforeAll;
30+
import org.junit.jupiter.api.Tag;
3031
import org.junit.jupiter.api.Test;
3132
import org.junit.jupiter.api.extension.RegisterExtension;
3233
import org.junit.jupiter.api.parallel.Execution;
@@ -40,7 +41,6 @@
4041
@Execution(ExecutionMode.CONCURRENT)
4142
class PythonRulingTest {
4243

43-
4444
@RegisterExtension
4545
public static final OrchestratorExtension ORCHESTRATOR = getOrchestrator();
4646
public static final Configuration CONFIGURATION = ORCHESTRATOR.getConfiguration();
@@ -65,6 +65,7 @@ static void install_sonar_scanner() {
6565
}
6666

6767
@Test
68+
@Tag("big-it-project")
6869
void test_airflow() throws IOException {
6970
SonarScanner build = buildWithCommonProperties("airflow");
7071
build.setProperty("sonar.sources", "airflow");
@@ -167,6 +168,7 @@ void test_docker_compose() throws IOException {
167168
}
168169

169170
@Test
171+
@Tag("big-it-project")
170172
void test_indico() throws IOException {
171173
SonarScanner build = buildWithCommonProperties("indico");
172174
build.setProperty("sonar.sources", "indico");
@@ -222,13 +224,15 @@ void test_pecos() throws IOException {
222224
}
223225

224226
@Test
227+
@Tag("big-it-project")
225228
void test_saleor() throws IOException {
226229
SonarScanner build = buildWithCommonProperties("saleor");
227230
build.setProperty("sonar.sources", "saleor");
228231
executeBuild(build);
229232
}
230233

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

254258
@Test
259+
@Tag("big-it-project")
255260
void test_tensorflow() throws IOException {
256261
SonarScanner build = buildWithCommonProperties("tensorflow");
257262
build.setProperty("sonar.sources", "python");

0 commit comments

Comments
 (0)