Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add testing profiles(solves invoker-maven-plugin invocation when -DskipITs is set) #3739

Merged
merged 3 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/rm@v1.0.3
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 @@ -424,6 +424,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
Loading