Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
codecov:
require_ci_to_pass: true

coverage:
precision: 2
round: down
range: "60...80"
status:
project:
default:
target: auto
threshold: 1%
patch:
default:
target: 80%
threshold: 5%

ignore:
- "**/*_test.go"
- "**/testdata/**"
- "docs/**"
- "hack/**"
- "experiments/**"
- "images/**"
- "**/*.md"
- "**/*.sh"

comment:
layout: "reach,diff,flags,files,footer"
behavior: default
require_changes: false
15 changes: 14 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,20 @@ jobs:
echo "1f4e0ef7f6554a6ed33dd7ac144fb2e1bbed98598e7af973042fc5cd43951c9a /tmp/lychee.tar.gz" | sha256sum -c
tar xzf /tmp/lychee.tar.gz -C /usr/local/bin --strip-components=1 lychee-x86_64-unknown-linux-gnu/lychee

- run: make test
- run: make lint-all

- name: Run Go tests with coverage
run: go test -race -coverprofile=coverage.out ./...
env:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] redundant-execution

Go tests are executed twice in the same job: first via make test (go test -race -cover) then again via go test -race -coverprofile=coverage.out. This doubles Go test execution time.

Suggested fix: Modify the Makefile go-test target to accept a COVERPROFILE variable, or remove the make test step since the coverage step runs the same tests.

GH_TOKEN: ""
GITHUB_TOKEN: ""

- run: make script-test

- name: Upload coverage to Codecov

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] supply-chain

The codecov/codecov-action is referenced by mutable major-version tag (@v5) rather than a full commit SHA. This follows the existing convention in the workflow, but SHA pinning is best practice. Risk is mitigated by read-only permissions.

uses: codecov/codecov-action@v5
with:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] supply-chain

The codecov/codecov-action is referenced by mutable major-version tag (@v5) rather than a full commit SHA. Follows existing repo convention but SHA pinning is best practice. Risk mitigated by read-only permissions.

Suggested fix: Pin the action to a specific commit SHA and use Dependabot or Renovate to keep the pin up to date.

files: coverage.out

commit-lint:
# On pull_request: lint the PR title (which becomes the merge commit
Expand Down
Loading