From 399bc13d38d9372153c90bec049dc7994383e221 Mon Sep 17 00:00:00 2001 From: Andres Adjimann Date: Fri, 9 Jun 2023 12:15:29 -0300 Subject: [PATCH] feat: fix an error when there is no coverage report We don't want the shell to process the wildcard in the arguments of istanbul-combine because it gives an error the error: `No matches found: "packages/*/coverage.json"` when there is no coverage at all, instead we want istanbul-combine to process it which gives 100% coverage for this case. See: https://github.com/thesandboxgame/sandbox-smart-contracts/actions/runs/5222655609/jobs/9428431470 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 76bed9f179..bc278850b8 100644 --- a/package.json +++ b/package.json @@ -10,13 +10,13 @@ "description": "The Sandbox smart contracts", "scripts": { "test": "nx run-many --target=test", - "coverage": "nx run-many --target=coverage && istanbul-combine -r lcov -r html packages/*/coverage.json", + "coverage": "nx run-many --target=coverage && istanbul-combine -r lcov -r html 'packages/*/coverage.json'", "lint": "nx run-many --target=lint", "format": "nx run-many --target=format", "deploy": "nx run-many --target=deploy", "all": "nx run-many --all --parallel --targets=lint,format,test,deploy && nx run-many --all --targets=coverage", "test:ci": "nx affected --target=test", - "coverage:ci": "nx affected --target=coverage && istanbul-combine -r lcov -r html packages/*/coverage.json", + "coverage:ci": "nx affected --target=coverage && istanbul-combine -r lcov -r html 'packages/*/coverage.json'", "lint:ci": "nx affected --target=lint", "format:ci": "nx affected --target=format", "deploy:ci": "nx affected --target=deploy",