multi: update make and CI goals with new packages
What changed, and why it matters
This commit only changes build, test, and continuous-integration configuration files. It adds new Go packages to the test/coverage targets and updates how coverage report files are cleaned up. There is no change to the actual Bitcoin node or library code that users run, and nothing in the commit suggests a security fix or vulnerability.
No security action needed. Treat as routine build/CI maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff updates .github/workflows/main.yml, .gitignore, and Makefile to include additional modules (address, chaincfg, chainhash, txscript, psbt, wire) in unit-test, race-test, and Coveralls coverage reporting. It also broadens the clean target to remove all coverage.txt and coverage.txt.bak files. No source code, cryptography, networking, or consensus logic is modified.
Changed components
.github/workflows/main.yml.gitignoreMakefileInspect captured patch +70 / −14
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index f290248..3fb2f37 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -56,7 +56,15 @@ jobs:
format: 'golang'
parallel: true
- - name: Send btcec
+ - name: Send address coverage
+ uses: coverallsapp/github-action@v2
+ with:
+ file: address/coverage.txt
+ flag-name: address
+ format: 'golang'
+ parallel: true
+
+ - name: Send btcec coverage
uses: coverallsapp/github-action@v2
continue-on-error: true
with:
@@ -65,6 +73,22 @@ jobs:
format: 'golang'
parallel: true
+ - name: Send chaincfg coverage
+ uses: coverallsapp/github-action@v2
+ with:
+ file: chaincfg/coverage.txt
+ flag-name: chaincfg
+ format: 'golang'
+ parallel: true
+
+ - name: Send chainhash coverage
+ uses: coverallsapp/github-action@v2
+ with:
+ file: chainhash/coverage.txt
+ flag-name: chainhash
+ format: 'golang'
+ parallel: true
+
- name: Send btcutil coverage
uses: coverallsapp/github-action@v2
continue-on-error: true
@@ -74,15 +98,33 @@ jobs:
format: 'golang'
parallel: true
- - name: Send btcutil coverage for psbt package
+ - name: Send psbt coverage
+ uses: coverallsapp/github-action@v2
+ continue-on-error: true
+ with:
+ file: psbt/coverage.txt
+ flag-name: psbt
+ format: 'golang'
+ parallel: true
+
+ - name: Send txscript coverage
uses: coverallsapp/github-action@v2
continue-on-error: true
with:
- file: btcutil/psbt/coverage.txt
- flag-name: btcutilpsbt
+ file: txscript/coverage.txt
+ flag-name: txscript
format: 'golang'
parallel: true
-
+
+ - name: Send wire coverage
+ uses: coverallsapp/github-action@v2
+ continue-on-error: true
+ with:
+ file: wire/coverage.txt
+ flag-name: wire
+ format: 'golang'
+ parallel: true
+
- name: Notify coveralls all reports sent
uses: coverallsapp/github-action@v2
continue-on-error: true
diff --git a/.gitignore b/.gitignore
index acfb8c4..6c5a1a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,9 +37,7 @@ _testmain.go
profile.tmp
profile.cov
coverage.txt
-btcec/coverage.txt
-btcutil/coverage.txt
-btcutil/psbt/coverage.txt
+coverage.txt.bak
# vim
*.swp
diff --git a/Makefile b/Makefile
index 4ccc503..0ea4a21 100644
--- a/Makefile
+++ b/Makefile
@@ -96,9 +96,14 @@ check: unit
unit:
@$(call print, "Running unit tests.")
$(GOTEST_DEV) ./... -test.timeout=20m
+ cd address && $(GOTEST_DEV) ./... -test.timeout=20m
cd btcec && $(GOTEST_DEV) ./... -test.timeout=20m
cd btcutil && $(GOTEST_DEV) ./... -test.timeout=20m
- cd btcutil/psbt && $(GOTEST_DEV) ./... -test.timeout=20m
+ cd chaincfg && $(GOTEST_DEV) ./... -test.timeout=20m
+ cd chainhash && $(GOTEST_DEV) ./... -test.timeout=20m
+ cd txscript && $(GOTEST_DEV) ./... -test.timeout=20m
+ cd psbt && $(GOTEST_DEV) ./... -test.timeout=20m
+ cd wire && $(GOTEST_DEV) ./... -test.timeout=20m
#? unit-cover: Run unit coverage tests
unit-cover:
@@ -107,17 +112,27 @@ unit-cover:
# We need to remove the /v2 pathing from the module to have it work
# nicely with the CI tool we use to render live code coverage.
+ cd address && $(GOTEST) $(COVER_FLAGS) ./... && sed -i.bak 's/v2\///g' coverage.txt
cd btcec && $(GOTEST) $(COVER_FLAGS) ./... && sed -i.bak 's/v2\///g' coverage.txt
- cd btcutil && $(GOTEST) $(COVER_FLAGS) ./...
- cd btcutil/psbt && $(GOTEST) $(COVER_FLAGS) ./...
+ cd btcutil && $(GOTEST) $(COVER_FLAGS) ./... && sed -i.bak 's/v2\///g' coverage.txt
+ cd chaincfg && $(GOTEST) $(COVER_FLAGS) ./... && sed -i.bak 's/v2\///g' coverage.txt
+ cd chainhash && $(GOTEST) $(COVER_FLAGS) ./... && sed -i.bak 's/v2\///g' coverage.txt
+ cd txscript && $(GOTEST) $(COVER_FLAGS) ./... && sed -i.bak 's/v2\///g' coverage.txt
+ cd psbt && $(GOTEST) $(COVER_FLAGS) ./... && sed -i.bak 's/v2\///g' coverage.txt
+ cd wire && $(GOTEST) $(COVER_FLAGS) ./... && sed -i.bak 's/v2\///g' coverage.txt
#? unit-race: Run unit race tests
unit-race:
@$(call print, "Running unit race tests.")
env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(GOTEST) -race -test.timeout=20m ./...
+ cd address && env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(GOTEST) -race -test.timeout=20m ./...
cd btcec && env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(GOTEST) -race -test.timeout=20m ./...
cd btcutil && env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(GOTEST) -race -test.timeout=20m ./...
- cd btcutil/psbt && env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(GOTEST) -race -test.timeout=20m ./...
+ cd chaincfg && env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(GOTEST) -race -test.timeout=20m ./...
+ cd chainhash && env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(GOTEST) -race -test.timeout=20m ./...
+ cd txscript && env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(GOTEST) -race -test.timeout=20m ./...
+ cd psbt && env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(GOTEST) -race -test.timeout=20m ./...
+ cd wire && env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(GOTEST) -race -test.timeout=20m ./...
# =========
# UTILITIES
@@ -138,7 +153,8 @@ lint: $(LINT_BIN)
#? clean: Clean source
clean:
@$(call print, "Cleaning source.$(NC)")
- rm -f coverage.txt btcec/coverage.txt btcutil/coverage.txt btcutil/psbt/coverage.txt
+ find . -name coverage.txt | xargs $(RM)
+ find . -name coverage.txt.bak | xargs $(RM)
#? tidy-module: Run 'go mod tidy' for all modules
tidy-module:
@@ -162,4 +178,4 @@ help: Makefile
@echo " Choose a command run in btcd:"
@sed -n 's/^#?//p' $< | column -t -s ':' | sort | sed -e 's/^/ /'
-.PHONY: help
\ No newline at end of file
+.PHONY: help
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.