Skip to content

Commit c05eb63

Browse files
committed
ci: vet build tags during tests
1 parent 2f4b7cd commit c05eb63

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/actions/test/action.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,26 @@ runs:
1212
env:
1313
CPATH: ${{env.CPATH}}
1414
run: |
15-
$commandPath = $(Join-Path . ...)
15+
$commandPath = Join-Path . ...
16+
$tagValues = & {
17+
$tags = 'nofuse', 'noipfs'
18+
$combinations = @()
19+
$allCombinations = [Math]::Pow(2, $tags.Length)
20+
for ($i = 0; $i -lt $allCombinations; $i++) {
21+
$components = @()
22+
for ($j = 0; $j -lt $tags.Length; $j++) {
23+
if (($i -band ([Math]::Pow(2, $j))) -ne 0) {
24+
$components += $tags[$j]
25+
}
26+
}
27+
if ($components.Count -gt 0) {
28+
$combinations += $components -join ','
29+
}
30+
}
31+
return $combinations
32+
}
33+
$tagValues | ForEach-Object {
34+
"go vet -tags=$_ ${commandPath}"
35+
}
1636
go test -cover ${commandPath}
1737
go test -race ${commandPath}

0 commit comments

Comments
 (0)