Skip to content

Commit efb66f0

Browse files
khasanovbigwatts
authored andcommitted
Add ability to exclude some tests from run
Adds `test-pkgs` arg
1 parent c36082f commit efb66f0

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

Diff for: action.yml

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ inputs:
2525
description: 'Build arguments to pass to go test'
2626
default: '[]'
2727
required: false
28+
test-pkgs:
29+
description: 'Parameter to pass to go tests packages'
30+
default: './...'
31+
required: false
2832
coverage-threshold:
2933
description: 'Fail the build if the coverage drops below supplied percentage'
3034
required: false

Diff for: dist/index.js

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ async function generateCoverage() {
153153

154154
const coverMode = core.getInput('cover-mode');
155155
const coverPkg = core.getInput('cover-pkg');
156+
const testPkgs = core.getInput('test-pkgs')
156157

157158
let testArgs;
158159
try {
@@ -172,7 +173,7 @@ async function generateCoverage() {
172173
'-coverprofile',
173174
report.gocovPathname,
174175
...(coverPkg ? ['-coverpkg', coverPkg] : []),
175-
'./...',
176+
...testPkgs.split('\n'),
176177
]);
177178
await exec('go', args);
178179

0 commit comments

Comments
 (0)