Skip to content

Commit

Permalink
Merge pull request #3739 from ArtemGet/feat/testing-profiles
Browse files Browse the repository at this point in the history
Add testing profiles(solves invoker-maven-plugin invocation when -DskipITs is set)
  • Loading branch information
yegor256 authored Dec 23, 2024
2 parents 768dad8 + f247ed5 commit d59b6a1
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- run: |
# Clean the test classes to avoid caching issues and prepare testing environment
# without running the tests
mvn clean install -Pqulice -DskipTests -DskipITs -Dinvoker.skip=true
mvn clean install -Pqulice -PskipTests
# Find script
SCRIPT=${GITHUB_WORKSPACE}/src/test/scripts/test-repetition.sh
# Check that script is exists
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ jobs:
key: maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-
- run: mvn install -DskipTests -Dinvoker.skip -Phone
- run: mvn install -PskipTests -Phone
- run: mvn test -Phone -pl :eo-runtime
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ jobs:
key: ubuntu-surefire-jdk-21-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ubuntu-surefire-jdk-21-maven-
- run: |
mvn clean install -DskipUTs --errors --batch-mode
mvn clean install -PskipUTs --errors --batch-mode
2 changes: 1 addition & 1 deletion .github/workflows/mvn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ jobs:
- uses: JesseTG/[email protected]
with:
path: ~/.m2/repository/org/eolang
- run: mvn clean install -DskipITs --errors --batch-mode
- run: mvn clean install -PskipITs --errors --batch-mode
2 changes: 1 addition & 1 deletion .github/workflows/qulice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jobs:
path: ~/.m2/repository
key: ubuntu-qulice-jdk-21-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ubuntu-qulice-jdk-21-maven-
- run: mvn clean verify -DskipTests -DskipITs -Pqulice --errors --batch-mode
- run: mvn clean verify -PskipTests -Pqulice --errors --batch-mode
23 changes: 9 additions & 14 deletions eo-maven-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,19 +149,14 @@ Here `fibonacci` is the name of the desired integration test, `-DskipTests` is u

It is sometime necessary to temporarily disable the integration tests (for example for introducing
braking changes into plugin or EO runtime). This can be achieved by disabling `maven-invoker-plugin`
execution within `eo-maven-plugin/pom.xml`:
using profile:

```xml
<plugins>
...
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<version>0.49.2</version>
<configuration>
<skipInstallation>true</skipInstallation>
<skipInvocation>true</skipInvocation>
</configuration>
</plugin>
...
</plugins>
```shell
mvn clean install -PskipITs
```

or by setting skipITs property:

```shell
mvn clean install -DskipITs
```
4 changes: 2 additions & 2 deletions eo-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ SOFTWARE.
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<configuration combine.self="override">
<skipInstallation>${skipTests}</skipInstallation>
<skipInvocation>${skipTests}</skipInvocation>
<skipInstallation>${skipITs}</skipInstallation>
<skipInvocation>${skipITs}</skipInvocation>
<pomExcludes/>
</configuration>
</plugin>
Expand Down
34 changes: 34 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,40 @@ SOFTWARE.
</pluginManagement>
</build>
<profiles>
<profile>
<id>skipTests</id>
<activation>
<property>
<name>skipTests</name>
</property>
</activation>
<properties>
<skipITs>true</skipITs>
<skipUTs>true</skipUTs>
</properties>
</profile>
<profile>
<id>skipITs</id>
<activation>
<property>
<name>skipITs</name>
</property>
</activation>
<properties>
<skipITs>true</skipITs>
</properties>
</profile>
<profile>
<id>skipUTs</id>
<activation>
<property>
<name>skipUTs</name>
</property>
</activation>
<properties>
<skipUTs>true</skipUTs>
</properties>
</profile>
<profile>
<id>qulice</id>
<build>
Expand Down

0 comments on commit d59b6a1

Please sign in to comment.