mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-18 05:02:15 +01:00
ci(test): no concurrency
This commit is contained in:
2
.github/actions/build-test-push/test.sh
vendored
2
.github/actions/build-test-push/test.sh
vendored
@@ -72,7 +72,7 @@ run_cmd() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd="make test-integration DOCKER_REPOSITORY=$repository GOTENBERG_VERSION=$version PLATFORM=$platform"
|
cmd="make test-integration DOCKER_REPOSITORY=$repository GOTENBERG_VERSION=$version PLATFORM=$platform NO_CONCURRENCY=true"
|
||||||
run_cmd "$cmd"
|
run_cmd "$cmd"
|
||||||
|
|
||||||
echo "✅ Done!"
|
echo "✅ Done!"
|
||||||
|
|||||||
4
Makefile
4
Makefile
@@ -160,13 +160,15 @@ test-unit: ## Run unit tests
|
|||||||
go test -race ./...
|
go test -race ./...
|
||||||
|
|
||||||
PLATFORM=
|
PLATFORM=
|
||||||
|
NO_CONCURRENCY=false
|
||||||
|
|
||||||
.PHONY: test-integration
|
.PHONY: test-integration
|
||||||
test-integration: ## Run integration tests
|
test-integration: ## Run integration tests
|
||||||
go test -tags=integration -v github.com/gotenberg/gotenberg/v8/test/integration -args \
|
go test -tags=integration -v github.com/gotenberg/gotenberg/v8/test/integration -args \
|
||||||
--gotenberg-docker-repository=$(DOCKER_REPOSITORY) \
|
--gotenberg-docker-repository=$(DOCKER_REPOSITORY) \
|
||||||
--gotenberg-version=$(GOTENBERG_VERSION) \
|
--gotenberg-version=$(GOTENBERG_VERSION) \
|
||||||
--gotenberg-container-platform=$(PLATFORM)
|
--gotenberg-container-platform=$(PLATFORM) \
|
||||||
|
--no-concurrency=$(NO_CONCURRENCY)
|
||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint: ## Lint Golang codebase
|
lint: ## Lint Golang codebase
|
||||||
|
|||||||
@@ -14,17 +14,11 @@ import (
|
|||||||
"github.com/gotenberg/gotenberg/v8/test/integration/scenario"
|
"github.com/gotenberg/gotenberg/v8/test/integration/scenario"
|
||||||
)
|
)
|
||||||
|
|
||||||
var opts = godog.Options{
|
|
||||||
Format: "pretty",
|
|
||||||
Paths: []string{"features"},
|
|
||||||
Output: colors.Colored(os.Stdout),
|
|
||||||
Concurrency: runtime.NumCPU(),
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestMain(m *testing.M) {
|
func TestMain(m *testing.M) {
|
||||||
repository := flag.String("gotenberg-docker-repository", "", "")
|
repository := flag.String("gotenberg-docker-repository", "", "")
|
||||||
version := flag.String("gotenberg-version", "", "")
|
version := flag.String("gotenberg-version", "", "")
|
||||||
platform := flag.String("gotenberg-container-platform", "", "")
|
platform := flag.String("gotenberg-container-platform", "", "")
|
||||||
|
noConcurrency := flag.Bool("no-concurrency", false, "")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
if *platform == "" {
|
if *platform == "" {
|
||||||
@@ -40,10 +34,20 @@ func TestMain(m *testing.M) {
|
|||||||
scenario.GotenbergVersion = *version
|
scenario.GotenbergVersion = *version
|
||||||
scenario.GotenbergContainerPlatform = *platform
|
scenario.GotenbergContainerPlatform = *platform
|
||||||
|
|
||||||
|
concurrency := runtime.NumCPU()
|
||||||
|
if *noConcurrency {
|
||||||
|
concurrency = 0
|
||||||
|
}
|
||||||
|
|
||||||
code := godog.TestSuite{
|
code := godog.TestSuite{
|
||||||
Name: "integration",
|
Name: "integration",
|
||||||
ScenarioInitializer: scenario.InitializeScenario,
|
ScenarioInitializer: scenario.InitializeScenario,
|
||||||
Options: &opts,
|
Options: &godog.Options{
|
||||||
|
Format: "pretty",
|
||||||
|
Paths: []string{"features"},
|
||||||
|
Output: colors.Colored(os.Stdout),
|
||||||
|
Concurrency: concurrency,
|
||||||
|
},
|
||||||
}.Run()
|
}.Run()
|
||||||
|
|
||||||
os.Exit(code)
|
os.Exit(code)
|
||||||
|
|||||||
Reference in New Issue
Block a user