Skip to content

Commit

Permalink
Merge branch 'main' into fixes/at-in-path
Browse files Browse the repository at this point in the history
  • Loading branch information
lukfor authored Dec 3, 2024
2 parents 5c4ef1e + e1f9604 commit 14439d1
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 27 deletions.
16 changes: 6 additions & 10 deletions docs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,14 @@ nf-test has been created by [Lukas Forer](https://twitter.com/lukfor) and [Sebas

## Contributors

[![@aaron-fishman-achillestx](https://avatars.githubusercontent.com/u/114482275?s=64&v=4)](https://github.com/aaron-fishman-achillestx)
[![@ivopieniak](https://avatars.githubusercontent.com/u/44971105?s=64&v=4)](https://github.com/ivopieniak)
[![@byb121](https://avatars.githubusercontent.com/u/3796450?s=64&v=4)](https://github.com/byb121)
[![@AstrobioMike](https://avatars.githubusercontent.com/u/13923308?s=64&v=4)](https://github.com/AstrobioMike)
[![@Emiller88](https://avatars.githubusercontent.com/u/20095261?s=64&v=4)](https://github.com/Emiller88)
[![@maxulysse](https://avatars.githubusercontent.com/u/1019628?s=64&v=4)](https://github.com/maxulysse)
[![@nvnieuwk](https://avatars.githubusercontent.com/u/101190534?s=64&v=4)](https://github.com/nvnieuwk)
[![@sateeshperi](https://avatars.githubusercontent.com/u/33637490?s=64&v=4)](https://github.com/sateeshperi)
[![@drpatelh](https://avatars.githubusercontent.com/u/23529759?s=64&v=4)](https://github.com/drpatelh)
<a href="https://github.com/askimed/nf-test/graphs/contributors">
<img src="https://contrib.rocks/image?repo=askimed/nf-test" />
</a>

Made with [contrib.rocks](https://contrib.rocks).

## Statistics

**GitHub**: <br/> ![release downloads](https://img.shields.io/github/downloads/askimed/nf-test/total)

**Bioconda**: <br/> ![conda downloads](https://anaconda.org/bioconda/nf-test/badges/downloads.svg)
**Bioconda**: <br/> ![conda downloads](https://anaconda.org/bioconda/nf-test/badges/downloads.svg)
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.askimed</groupId>
<artifactId>nf-test</artifactId>
<version>0.9.0</version>
<version>0.9.2</version>
<name>nf-test</name>
<description>Simple test framework for Nextflow pipelines</description>
<url>https://github.com/askimed/nf-test</url>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/askimed/nf/test/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class App {

public static final String NAME = "nf-test";

public static final String VERSION = "0.9.0";
public static final String VERSION = "0.9.2";

public static final String PACKAGE = "com.askimed.nf.test";

Expand Down
21 changes: 10 additions & 11 deletions src/main/java/com/askimed/nf/test/commands/RunTestsCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -243,16 +243,6 @@ public Integer execute() throws Exception {
DependencyExporter.generateDotFile(resolver, graph);
}


if (scripts.isEmpty()) {
System.out.println(AnsiColors
.yellow("No tests to execute."));
log.warn("No tests or directories found containing test files. Or all testcases were filtered.");
return 0;
} else {
log.info("Detected {} test files.", scripts.size());
}

loadPlugins(manager, plugins);

GroupTestExecutionListener listener = setupExecutionListeners();
Expand All @@ -267,13 +257,22 @@ public Integer execute() throws Exception {
List<ITestSuite> testSuits = testSuiteResolver.parse(scripts, new TagQuery(tags));

testSuits.sort(TestSuiteSorter.getDefault());
if (shard != null) {
if (shard != null && !testSuits.isEmpty()) {
if (shardStrategy.equalsIgnoreCase(SHARD_STRATEGY_ROUND_ROBIN)){
testSuits = TestSuiteSharder.shardWithRoundRobin(testSuits, shard);
} else {
testSuits = TestSuiteSharder.shard(testSuits, shard);
}
}

int totalTests = testSuits.stream().mapToInt(testSuite -> testSuite.getTests().size()).sum();
log.info("Found {} tests to execute.", totalTests);

if (testSuits.isEmpty()) {
System.out.println(AnsiColors
.yellow("No tests to execute."));
return 0;
}

TestExecutionEngine engine = new TestExecutionEngine();
engine.setListener(listener);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public List<File> findAllTests() throws Exception {
}
}

log.info("Found {} tests.", results.size());
log.info("Found {} files containing tests.", results.size());

return results;
}
Expand All @@ -80,8 +80,8 @@ public List<File> findTestsByFiles(List<File> files) throws Exception {
}
}

log.info("Found {} tests.", results.size());
log.debug("Found tests: " + results);
log.info("Found {} files containing tests.", results.size());
log.debug("Found files: " + results);

return results;
}
Expand Down Expand Up @@ -111,7 +111,7 @@ public List<File> findRelatedTestsByFiles(File ... files) throws Exception {
results.addAll(findRelatedTestsByFile(file.getAbsoluteFile()));
}
long time1 = System.currentTimeMillis();
log.info("Found {} tests for file {} in {} sec", results.size(), files, (time1 - time0) / 1000.0);
log.info("Found {} files containing tests for file {} in {} sec", results.size(), files, (time1 - time0) / 1000.0);

return new Vector<File>(results);
}
Expand Down

0 comments on commit 14439d1

Please sign in to comment.