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

Assertj multimodule build #2424

Open
5 of 9 tasks
joel-costigliola opened this issue Nov 28, 2021 · 13 comments
Open
5 of 9 tasks

Assertj multimodule build #2424

joel-costigliola opened this issue Nov 28, 2021 · 13 comments
Assignees
Labels
status: team discussion An issue we'd like to discuss as a team to make progress type: improvement A general improvement

Comments

@joel-costigliola
Copy link
Member

joel-costigliola commented Nov 28, 2021

Summary

We tests assertj core with integration tests to validate junit 4, testng and osgi integration, this works but is more a workaround to simulate different environments.

A better solution consists in defining a multi module project where junit 4 and testng checks will be done in their own modules which are closer to real project using assertj.

Modules:

  • assertj-core
  • assertj-guava
  • assertj-db
  • assertj-joda
  • assertj-neo4j
  • assertj-examples
  • assertj-core-junit4-with-opentest4j and remove the corresponding integration tests in assertj-core
  • assertj-core-junit4-with-testng and remove the corresponding integration tests in assertj-core
  • assertj-core-osgi-tests and remove the corresponding integration tests in assertj-core

Github actions

We need to update our CI actions to build the multimodule project.

A commit in main should trigger all the modules build but the assertj core CI build should only reports errors when any of these modules build fail:

  • assertj-core module
  • assertj-core-junit4-with-opentest4j
  • assertj-core-junit4-with-testng
  • assertj-core-osgi-tests

The assertj core should not fail if an assertions module fails (ex: assertj-guava), this should be reported by the assertion module build itself.

@joel-costigliola joel-costigliola added improvement status: team discussion An issue we'd like to discuss as a team to make progress labels Nov 28, 2021
@scordio
Copy link
Member

scordio commented Mar 9, 2022

Moving OSGi integration tests to a separate artifact would also address #2347.

@scordio
Copy link
Member

scordio commented Apr 22, 2022

Proposal for a first milestone:

  1. Update the project to be a multi-module:
assertj-build
 |--- assertj-core
  1. Convert assertj/assertj-parent-pom to be a submodule (keeping git history) and archive the source repository
assertj-build
 |--- assertj-core
 |--- assertj-parent
  1. Rename assertj/assertj-core repository to assertj/assertj

@joel-costigliola
Copy link
Member Author

I'd like to know that point 3. is 😄 but otherwise I like the MVP like approach.

One thing I'd like the multimodule build to support is a selection of module to build,ex

  • assertj-core
  • assertj-examples
  • assertj-core-junit4-with-opentest4j and remove the corresponding integration tests in assertj-core
  • assertj-core-junit4-with-testng and remove the corresponding integration tests in assertj-core
  • assertj-core-osgi-tests and remove the corresponding integration tests in assertj-core

We can achieve that with a shell script if we can't directly with maven.

@scordio
Copy link
Member

scordio commented Apr 23, 2022

Point 3 is where the magic happens 🪄 😄

We can selectively build submodules, I guess a mixture of the following options can help tune our workflows (source):

-rf, --resume-from
        Resume reactor from specified project
-pl, --projects
        Build specified reactor projects instead of all projects
-am, --also-make
        If project list is specified, also build projects required by the list
-amd, --also-make-dependents
        If project list is specified, also build projects that depend on projects on the list 

Even better, I'd try to go with Maven profiles to enable the proper submodules easily.

@vlsi
Copy link
Contributor

vlsi commented May 30, 2022

Convert assertj/assertj-parent-pom to be a submodule

Is the submodule really needed?
Would it work if it is a regular folder in assertj/assertj repo?

@scordio
Copy link
Member

scordio commented Aug 1, 2022

Convert assertj/assertj-parent-pom to be a submodule (keeping git history) and archive the source repository

Done with the following steps:

  1. Clone a fresh copy of assertj/assertj-parent-pom
  2. Move all relevant files from assertj-parent-pom into an assertj-parent subdirectory (d42bee9)
  3. Configure the local copy of assertj-parent-pom as a remote of assertj-core
  4. Execute git merge assertj-parent-pom/main --allow-unrelated-histories on assertj-core/main (20b0be5)
  5. Apply further changes after the import (01e395a)
  6. Push all the changes

@scordio
Copy link
Member

scordio commented Aug 1, 2022

Rename assertj/assertj-core repository to assertj/assertj

Done.

@scordio
Copy link
Member

scordio commented Aug 2, 2022

Proposal for the second milestone:

  1. New modules to better segregate integration tests:
assertj-build
 |--- assertj-core
 |--- assertj-parent
 |--- assertj-tests
       |--- assertj-integration-tests
             |--- assertj-core-junit4-with-opentest4j
             |--- assertj-core-osgi
             |--- assertj-core-testng-with-junit4
       |--- assertj-performance-tests
             |--- ...

I introduced a general assertj-tests module because we could move some existing performance tests into a separate assertj-performance-tests module.

  1. Convert assertj/assertj-guava to be a submodule (keeping git history) and archive the source repository:
assertj-build
 |--- assertj-core
 |--- assertj-guava
 |--- assertj-parent
 |--- assertj-tests
       |--- ...

@joel-costigliola
Copy link
Member Author

looks good to me, so you would put assertj-performance-tests as a top level module or would it be under assertj-tests ?

@scordio
Copy link
Member

scordio commented Aug 2, 2022

Under assertj-tests

@scordio
Copy link
Member

scordio commented Nov 20, 2022

Convert assertj/assertj-guava to be a submodule (keeping git history) and archive the source repository

Done with the following steps:

  1. Clone a fresh copy of assertj/assertj-guava
  2. Move all relevant files from assertj-guava into an assertj-guava subdirectory (9fc1c2d)
  3. Configure the local copy of assertj-guava as a remote of assertj-core
  4. Execute git merge assertj-guava/main --allow-unrelated-histories on assertj-core/main (4387b1f)
  5. Apply further changes after the import (2d1861b)
  6. Push all the changes

@scordio
Copy link
Member

scordio commented May 12, 2023

@joel-costigliola do we want to include also the assertion generators projects based on Maven?

@joel-costigliola
Copy link
Member Author

Not until we have a maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: team discussion An issue we'd like to discuss as a team to make progress type: improvement A general improvement
Projects
None yet
Development

No branches or pull requests

3 participants