File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -35,13 +35,29 @@ jobs:
3535 - name : Verify dependencies
3636 shell : bash
3737 run : |
38+ # Check file existence for debugging
39+ echo "Checking if go.mod and go.sum exist"
40+ if [ -f "go.mod" ]; then
41+ echo "go.mod exists"
42+ else
43+ echo "go.mod does not exist"
44+ exit 1
45+ fi
46+
47+ if [ -f "go.sum" ]; then
48+ echo "go.sum exists"
49+ else
50+ echo "go.sum does not exist, will be created by go mod tidy"
51+ fi
52+
53+ # Download and tidy dependencies
3854 go mod download
3955 go mod tidy
4056
4157 - name : Run tests
4258 shell : bash
4359 run : |
44- go test -v -race -coverprofile=coverage.txt -covermode=atomic ./stl/...
60+ go test -v -race -coverprofile=coverage.txt -covermode=atomic ./stl/... || (echo "Tests failed" && exit 1)
4561
4662 - name : Run examples
4763 shell : bash
@@ -126,6 +142,11 @@ jobs:
126142 gosec -fmt=sarif -out=gosec-results.sarif ./stl || echo "gosec SARIF output failed"
127143 # Show results summary
128144 gosec ./stl || echo "gosec scan failed"
145+ # Ensure SARIF file exists for upload
146+ if [ ! -f "gosec-results.sarif" ]; then
147+ echo "Creating minimal valid SARIF file"
148+ echo '{"version":"2.1.0","runs":[]}' > gosec-results.sarif
149+ fi
129150
130151 - name : Install Nancy
131152 run : go install github.com/sonatype-nexus-community/nancy@latest
You can’t perform that action at this time.
0 commit comments