Skip to content

Commit ac572c4

Browse files
committed
Setup QA
1 parent 12d0c9f commit ac572c4

245 files changed

Lines changed: 1311 additions & 1235 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cix.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Definition of QA pipeline at SonarSource
2+
3+
4+
TEST:
5+
- plugin
6+
- ruling
7+
8+
SQ_VERSION:
9+
- DEV
10+
- LATEST_RELEASE
11+
- LTS
12+
13+
exclude:
14+
- TEST: plugin
15+
SQ_VERSION: LATEST_RELEASE
16+
17+
- TEST: ruling
18+
SQ_VERSION: DEV
19+
20+
- TEST: ruling
21+
SQ_VERSION: LTS

.travis.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@ script: ./travis.sh
99
env:
1010
- TEST=ci
1111

12-
- TEST=ruling
13-
SQ_VERSION=LATEST_RELEASE
14-
15-
- TEST=plugin
16-
SQ_VERSION=DEV
17-
18-
- TEST=plugin
19-
SQ_VERSION=LTS
20-
2112
matrix:
2213
fast_finish: true
2314

@@ -27,3 +18,5 @@ cache:
2718

2819
notifications:
2920
email: false
21+
webhooks:
22+
- secure: "kY/6qPf7wxMrEhC+ch4XTChAukoIUw0RG3IK7vRY9ATSI9vTF3XNpXu6c53CwhnDcdDacaTIYVxrw+ewpIr0AWd3Pvtixb2X7Z/nzN2PdetvL7bqzXsTwfss7YlWOIHO+pt54cb8lRbVnp9uNxINBMGPpjLK1h+Szb+YJThp6e0="

cix.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
echo "Running $TEST with SQ=$SQ_VERSION"
4+
5+
case "$TEST" in
6+
plugin|ruling)
7+
8+
cd its/$TEST
9+
mvn test -Dsonar.runtimeVersion="$SQ_VERSION" -Dmaven.test.redirectTestOutputToFile=false
10+
;;
11+
12+
*)
13+
echo "Unexpected TEST mode: $TEST"
14+
exit 1
15+
;;
16+
esac
17+

its/plugin/pom.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44
<modelVersion>4.0.0</modelVersion>
55

66
<parent>
7-
<groupId>org.sonarsource.parent</groupId>
8-
<artifactId>parent</artifactId>
9-
<version>23</version>
7+
<groupId>org.sonarsource.python</groupId>
8+
<artifactId>python-its</artifactId>
9+
<version>1.6-SNAPSHOT</version>
1010
</parent>
1111

12-
<groupId>org.sonarsource.python.it</groupId>
1312
<artifactId>it-python-plugin</artifactId>
14-
<version>1.0-SNAPSHOT</version>
15-
13+
1614
<name>Python :: ITs :: Plugin</name>
1715
<inceptionYear>2012</inceptionYear>
1816
<organization>

its/plugin/src/test/java/com/sonar/python/it/plugin/CoverageTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Python :: ITs :: Plugin
3-
* Copyright (C) 2012 SonarSource and Waleri Enns
4-
* sonarqube@googlegroups.com
2+
* SonarQube Python Plugin
3+
* Copyright (C) 2012-2016 SonarSource SA
4+
* mailto:contact AT sonarsource DOT com
55
*
66
* This program is free software; you can redistribute it and/or
77
* modify it under the terms of the GNU Lesser General Public
@@ -13,9 +13,9 @@
1313
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1414
* Lesser General Public License for more details.
1515
*
16-
* You should have received a copy of the GNU Lesser General Public
17-
* License along with this program; if not, write to the Free Software
18-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1919
*/
2020
package com.sonar.python.it.plugin;
2121

its/plugin/src/test/java/com/sonar/python/it/plugin/MetricsTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Python :: ITs :: Plugin
3-
* Copyright (C) 2012 SonarSource and Waleri Enns
4-
* sonarqube@googlegroups.com
2+
* SonarQube Python Plugin
3+
* Copyright (C) 2012-2016 SonarSource SA
4+
* mailto:contact AT sonarsource DOT com
55
*
66
* This program is free software; you can redistribute it and/or
77
* modify it under the terms of the GNU Lesser General Public
@@ -13,9 +13,9 @@
1313
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1414
* Lesser General Public License for more details.
1515
*
16-
* You should have received a copy of the GNU Lesser General Public
17-
* License along with this program; if not, write to the Free Software
18-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1919
*/
2020
package com.sonar.python.it.plugin;
2121

its/plugin/src/test/java/com/sonar/python/it/plugin/PylintReportTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Python :: ITs :: Plugin
3-
* Copyright (C) 2012 SonarSource and Waleri Enns
4-
* sonarqube@googlegroups.com
2+
* SonarQube Python Plugin
3+
* Copyright (C) 2012-2016 SonarSource SA
4+
* mailto:contact AT sonarsource DOT com
55
*
66
* This program is free software; you can redistribute it and/or
77
* modify it under the terms of the GNU Lesser General Public
@@ -13,9 +13,9 @@
1313
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1414
* Lesser General Public License for more details.
1515
*
16-
* You should have received a copy of the GNU Lesser General Public
17-
* License along with this program; if not, write to the Free Software
18-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1919
*/
2020
package com.sonar.python.it.plugin;
2121

its/plugin/src/test/java/com/sonar/python/it/plugin/TestReportTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Python :: ITs :: Plugin
3-
* Copyright (C) 2012 SonarSource and Waleri Enns
4-
* sonarqube@googlegroups.com
2+
* SonarQube Python Plugin
3+
* Copyright (C) 2012-2016 SonarSource SA
4+
* mailto:contact AT sonarsource DOT com
55
*
66
* This program is free software; you can redistribute it and/or
77
* modify it under the terms of the GNU Lesser General Public
@@ -13,9 +13,9 @@
1313
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1414
* Lesser General Public License for more details.
1515
*
16-
* You should have received a copy of the GNU Lesser General Public
17-
* License along with this program; if not, write to the Free Software
18-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1919
*/
2020
package com.sonar.python.it.plugin;
2121

its/plugin/src/test/java/com/sonar/python/it/plugin/Tests.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Python :: ITs :: Plugin
3-
* Copyright (C) 2012 SonarSource and Waleri Enns
4-
* sonarqube@googlegroups.com
2+
* SonarQube Python Plugin
3+
* Copyright (C) 2012-2016 SonarSource SA
4+
* mailto:contact AT sonarsource DOT com
55
*
66
* This program is free software; you can redistribute it and/or
77
* modify it under the terms of the GNU Lesser General Public
@@ -13,9 +13,9 @@
1313
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1414
* Lesser General Public License for more details.
1515
*
16-
* You should have received a copy of the GNU Lesser General Public
17-
* License along with this program; if not, write to the Free Software
18-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1919
*/
2020
package com.sonar.python.it.plugin;
2121

@@ -30,6 +30,8 @@
3030
import java.util.Map;
3131
import java.util.Map.Entry;
3232

33+
import java.io.File;
34+
3335
import static org.fest.assertions.Assertions.assertThat;
3436

3537
@RunWith(Suite.class)
@@ -43,7 +45,7 @@ public class Tests {
4345

4446
@ClassRule
4547
public static Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
46-
.addPlugin(FileLocation.of("../../sonar-python-plugin/target/sonar-python-plugin.jar"))
48+
.addPlugin(FileLocation.byWildcardMavenFilename(new File("../../sonar-python-plugin/target"), "sonar-python-plugin-*.jar"))
4749
.restoreProfileAtStartup(FileLocation.of("profiles/no_rule.xml"))
4850
.restoreProfileAtStartup(FileLocation.of("profiles/pylint.xml"))
4951
.build();

its/pom.xml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<parent>
6+
<groupId>org.sonarsource.python</groupId>
7+
<artifactId>python</artifactId>
8+
<version>1.6-SNAPSHOT</version>
9+
</parent>
10+
11+
<artifactId>python-its</artifactId>
12+
<name>Python :: IT</name>
13+
<packaging>pom</packaging>
14+
15+
<modules>
16+
<module>plugin</module>
17+
<module>ruling</module>
18+
</modules>
19+
20+
<profiles>
21+
<profile>
22+
<id>qa</id>
23+
<activation>
24+
<property>
25+
<name>env.SONARSOURCE_QA</name>
26+
<value>true</value>
27+
</property>
28+
</activation>
29+
<build>
30+
<plugins>
31+
<plugin>
32+
<groupId>org.apache.maven.plugins</groupId>
33+
<artifactId>maven-dependency-plugin</artifactId>
34+
<version>2.10</version>
35+
<executions>
36+
<execution>
37+
<id>copy-plugin</id>
38+
<phase>generate-test-resources</phase>
39+
<goals>
40+
<goal>copy</goal>
41+
</goals>
42+
<configuration>
43+
<artifactItems>
44+
<artifactItem>
45+
<groupId>${project.groupId}</groupId>
46+
<artifactId>sonar-python-plugin</artifactId>
47+
<version>${project.version}</version>
48+
<type>sonar-plugin</type>
49+
<overWrite>true</overWrite>
50+
</artifactItem>
51+
</artifactItems>
52+
<outputDirectory>../../sonar-python-plugin/target</outputDirectory>
53+
<overWriteReleases>true</overWriteReleases>
54+
<overWriteSnapshots>true</overWriteSnapshots>
55+
</configuration>
56+
</execution>
57+
</executions>
58+
</plugin>
59+
</plugins>
60+
</build>
61+
</profile>
62+
</profiles>
63+
64+
</project>

0 commit comments

Comments
 (0)