chore: skip marketplace and long integration tests (#1326)

This commit is contained in:
Arnaud 2025-10-22 12:22:33 +04:00 committed by GitHub
parent e3d8d195c3
commit af55a761e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View File

@ -2,13 +2,14 @@ import std/macros
import std/os
import std/strutils
macro importTests*(dir: static string): untyped =
macro importTests*(dir: static string, excludes: static string = ""): untyped =
## imports all files in the specified directory whose filename
## starts with "test" and ends in ".nim"
let imports = newStmtList()
let excludeList = excludes.split(",")
for file in walkDirRec(dir):
let (_, name, ext) = splitFile(file)
if name.startsWith("test") and ext == ".nim":
if name.startsWith("test") and ext == ".nim" and not (name in excludeList):
imports.add(
quote do:
import `file`

View File

@ -12,6 +12,11 @@ when includes != "":
importAll(includes.split(","))
else:
# import all tests in the integration/ directory
importTests(currentSourcePath().parentDir() / "integration")
importTests(
currentSourcePath().parentDir() / "integration" / "1_minute", "testpurchasing"
)
importTests(
currentSourcePath().parentDir() / "integration" / "5_minutes", "testsales"
)
{.warning[UnusedImport]: off.}