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

option to make -DskipTests optional #42

Open
mbeaudry-coveo opened this issue Jul 26, 2024 · 0 comments
Open

option to make -DskipTests optional #42

mbeaudry-coveo opened this issue Jul 26, 2024 · 0 comments

Comments

@mbeaudry-coveo
Copy link

When this plugin executes the deploy maven target, it uses the -DskipTests option as shown here:

    try {
        await exec(
          command,
          [
              ...cleanOption,
              ...mavenTarget.split(' '),
              ...settingsOption(settingsPath),
              ...debugOption,
              '--batch-mode',
              '--no-transfer-progress',
              '-DskipTests'  // <=======
          ]
        );

Because this option is used, we are forced to run mvn twice in our CI:

  1. We first run mvn verify to make sure that all our tests pass. This is necessary to ensure that the release will be ok.
  2. Then, mvn is called a second time indirectly when we call npx semantic-release.

In some cases, calling maven twice can add significant delays to a build. Ideally, it would be possible to only call npx semantic-release to both run the tests and deploy the pacakge.

So what do you think of adding an option so that -DskipTests can be added or not to the mvn deploy invocation? This would shave many minutes for several projects that I am working on.

Thanks for considering this change and for maintaining the tool 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant