Skip to content

Enhance CI and project structure with updates and automation#23

Open
marcschaeferger wants to merge 5 commits into
mainfrom
dev-marc
Open

Enhance CI and project structure with updates and automation#23
marcschaeferger wants to merge 5 commits into
mainfrom
dev-marc

Conversation

@marcschaeferger

Copy link
Copy Markdown
Member

Description

This pull request introduces comprehensive improvements to the project's development workflow, code quality enforcement, and testing. Major changes include the addition of automated CI via GitHub Actions, stricter dependency and update management, the introduction of extensive linting rules, and the addition of thorough unit tests for core logic. The Go version is also updated to 1.26 for improved compatibility and features.

Continuous Integration and Quality Checks

  • Added a new GitHub Actions workflow (ci.yml) to automate testing, linting, vulnerability scanning, and plugin metadata validation on every push and pull request. This ensures code quality and early detection of issues.
  • Introduced a Makefile with targets for formatting, linting, testing, vulnerability checks, Yaegi compatibility, and a combined ci target that mirrors the CI pipeline.

Dependency and Update Management

  • Updated .github/dependabot.yml to group and limit pull requests for Go modules and GitHub Actions dependencies, improving update hygiene and reducing noise.
  • Bumped Go version in .go-version and go.mod from 1.25 to 1.26 to leverage newer language features and maintain support. [1] [2]

Linting and Code Quality

  • Added a detailed .golangci.yml configuration, enabling a wide range of linters for correctness, security, maintainability, and dependency hygiene, with project-specific relaxations and exclusions to balance strictness and practicality.

Testing Improvements

  • Added comprehensive unit tests for the main handler logic in badger_test.go, covering configuration validation, IP header handling, and session cookie management.
  • Introduced a test for the Cloudflare IP allowlist in ips/ips_test.go to ensure all entries are valid CIDRs.

Note:

PR Titel and Description generated by AI. Code/Repo changes 100% by human

…stem and add github ci action

Signed-off-by: Marc Schäfer <git@marcschaeferger.de>
…es and add test coverage

Signed-off-by: Marc Schäfer <git@marcschaeferger.de>
Signed-off-by: Marc Schäfer <git@marcschaeferger.de>
…angci config

Signed-off-by: Marc Schäfer <git@marcschaeferger.de>
…nd badges

Signed-off-by: Marc Schäfer <git@marcschaeferger.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant