* docs: add configuration documentation to README Added a new 'Configuration' section to README.md as per the Documentation Audit Report (PR #209). Included: - Default configuration file location (~/.core/config.yaml) - Configuration file format (YAML) with examples - Layered configuration resolution order - Environment variable mapping for config overrides (CORE_CONFIG_*) - Common environment variables (CORE_DAEMON, NO_COLOR, MCP_ADDR, etc.) * docs: add configuration documentation and fix CI/CD auto-merge README.md: - Added comprehensive 'Configuration' section as per audit report #209. - Documented file format, location, and layered resolution order. - Provided environment variable mapping rules and common examples. .github/workflows/auto-merge.yml: - Replaced broken reusable workflow with a local implementation. - Added actions/checkout step to provide necessary Git context. - Fixed 'not a git repository' error by providing explicit repo context to the 'gh' CLI via the -R flag. - Maintained existing bot trust and author association logic. pkg/io/local/client.go: - Fixed code formatting to ensure QA checks pass. * docs: update environment variable description and fix merge conflict - Refined the description of environment variable mapping to be more accurate, clarifying that the prefix is stripped before conversion. - Resolved merge conflict in .github/workflows/auto-merge.yml. - Maintained the local auto-merge implementation to ensure Git context for the 'gh' CLI. * docs: configuration documentation, security fixes, and CI improvements README.md: - Added comprehensive 'Configuration' section as per audit report #209. - Documented file format, location, and layered resolution order. - Provided environment variable mapping rules and common examples. - Added documentation for UniFi configuration options. .github/workflows/auto-merge.yml: - Replaced broken reusable workflow with a local implementation. - Added actions/checkout step to provide necessary Git context. - Fixed 'not a git repository' error by providing explicit repo context to the 'gh' CLI via the -R flag. pkg/unifi: - Fixed security vulnerability (CodeQL) by making TLS verification configurable instead of always skipped. - Added 'unifi.insecure' config key and UNIFI_INSECURE env var. - Updated New and NewFromConfig signatures to handle insecure flag. internal/cmd/unifi: - Added --insecure flag to 'config' command to skip TLS verification. - Updated all UniFi subcommands to support the new configuration logic. pkg/io/local/client.go: - Fixed code formatting to ensure QA checks pass. * docs: configuration documentation, tests, and CI/CD fixes README.md: - Added comprehensive 'Configuration' section as per audit report #209. - Documented file format, location, and layered resolution order. - Provided environment variable mapping rules and common examples. - Documented UniFi configuration options. pkg/unifi: - Fixed security vulnerability by making TLS verification configurable. - Added pkg/unifi/config_test.go and pkg/unifi/client_test.go to provide unit test coverage for new and existing logic (satisfying Codecov). .github/workflows/auto-merge.yml: - Added actions/checkout@v4 to provide the required Git context for the 'gh' CLI, fixing 'not a git repository' errors. pkg/framework/core/core.go: - Fixed compilation errors in Workspace() and Crypt() methods due to upstream changes in MustServiceFor() return signature. - Added necessary error handling to pkg/workspace/service.go. These changes ensure that the project documentation is up-to-date and that the CI/CD pipeline is stable and secure.
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
name: Coverage
|
|
|
|
on:
|
|
push:
|
|
branches: [dev, main]
|
|
pull_request:
|
|
branches: [dev, main]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
CORE_VERSION: dev
|
|
|
|
jobs:
|
|
coverage:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
|
|
- name: Install system dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
# Try 4.1 first (Ubuntu 22.04+), fall back to 4.0 (Ubuntu 20.04)
|
|
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev || \
|
|
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev
|
|
|
|
- name: Build core CLI
|
|
run: |
|
|
go build -ldflags "-X github.com/host-uk/core/pkg/cli.AppVersion=${{ env.CORE_VERSION }}" -o /usr/local/bin/core .
|
|
core --version
|
|
|
|
- name: Generate code
|
|
run: go generate ./internal/cmd/updater/...
|
|
|
|
- name: Run coverage
|
|
run: core go cov
|
|
|
|
- name: Upload coverage reports to Codecov
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
- name: Upload coverage report
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: coverage-report
|
|
path: coverage.txt
|