Skip to content

Commit fda751b

Browse files
committed
ci: remove disabled code quality upload
1 parent 455f4ef commit fda751b

2 files changed

Lines changed: 23 additions & 14 deletions

File tree

.github/workflows/go-cli.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
runs-on: ubuntu-latest
1717
permissions:
1818
contents: read
19-
code-quality: write
2019
steps:
2120
- uses: actions/checkout@v7
2221
- uses: actions/setup-go@v7
@@ -39,19 +38,6 @@ jobs:
3938
- run: task build
4039
- run: ./devcontainer --version
4140

42-
# Convert the Go coverage profile (coverage.out) to Cobertura XML for
43-
# GitHub's native Code Quality feature.
44-
- name: Convert coverage to Cobertura XML
45-
run: |
46-
go install github.com/boumenot/gocover-cobertura@latest
47-
gocover-cobertura < coverage.out > coverage.xml
48-
- name: Upload coverage report
49-
uses: actions/upload-code-coverage@v1
50-
with:
51-
file: coverage.xml
52-
language: Go
53-
label: code-coverage/go
54-
5541
# Binary covdata for the cross-lane merge (coverage-report job).
5642
- uses: actions/upload-artifact@v7
5743
if: always()
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package cli
2+
3+
import (
4+
"os"
5+
"path/filepath"
6+
"strings"
7+
"testing"
8+
)
9+
10+
func TestGoCLIWorkflowDoesNotUploadDisabledCodeQualityCoverage(t *testing.T) {
11+
workflowPath := filepath.Join("..", "..", ".github", "workflows", "go-cli.yml")
12+
data, err := os.ReadFile(workflowPath)
13+
if err != nil {
14+
t.Fatalf("read %s: %v", workflowPath, err)
15+
}
16+
17+
workflow := string(data)
18+
for _, disabledSetting := range []string{"actions/upload-code-coverage", "code-quality: write"} {
19+
if strings.Contains(workflow, disabledSetting) {
20+
t.Errorf("%s still contains disabled Code Quality setting %q", workflowPath, disabledSetting)
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)