Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4d18bb6
Add custom .yamllint configuration for flexible YAML linting rules
michaelbeutler Sep 4, 2025
82858ca
Update CI workflow: Upgrade Go version to 1.24, enhance dependency ch…
michaelbeutler Sep 4, 2025
7468184
Add YAML workflow files to CI trigger paths
michaelbeutler Sep 4, 2025
c3a11df
Remove unnecessary comments from test coverage step in CI workflow
michaelbeutler Sep 4, 2025
369d5c3
Refactor import statements to use aliasing for decoder packages
michaelbeutler Sep 4, 2025
b61e5ae
Refactor import statements to use aliasing for encoder packages
michaelbeutler Sep 4, 2025
6de082b
Refactor deployment.yaml: standardize indentation and formatting for …
michaelbeutler Sep 4, 2025
4ab88fb
Remove .vscode directory from .gitignore and add tasks.json for pre-c…
michaelbeutler Sep 4, 2025
6451ef4
Fix metric label casing for consistency: change "devEUI" to "devEui"
michaelbeutler Sep 4, 2025
3457d46
Remove TruffleHog secret scanning step from CI workflow
michaelbeutler Sep 4, 2025
f74bd94
Add support for Port 198 payload and enhance Port 197 payload structure
michaelbeutler Sep 5, 2025
49d6f9b
Add support for Port 200 and Port 201 payloads with corresponding tests
michaelbeutler Sep 5, 2025
30d5ee7
Add test cases for payloads on Ports 198, 200, and 201
michaelbeutler Sep 5, 2025
425b24a
Add support for Port 193 in the Decode function
michaelbeutler Sep 5, 2025
a8746ce
Define constants for Port 152 versions to improve code readability an…
michaelbeutler Sep 5, 2025
b956338
Add support for Port 193 payload structure and update decoder logic
michaelbeutler Sep 5, 2025
ffb302f
Add SolverV2 interface with mock implementations
michaelbeutler Sep 16, 2025
aaf24d5
Implement Loracloud V2 client with error handling and metrics tracking
michaelbeutler Sep 16, 2025
4aecda7
Add unit tests for MockSolverV1 and MockSolverV2 with data and error …
michaelbeutler Sep 16, 2025
c4cd5ed
Add unit tests for Port193Payload to validate GNSS methods and interf…
michaelbeutler Sep 16, 2025
5545e1b
Update generated_at timestamp in .secrets.baseline
michaelbeutler Sep 16, 2025
8e73406
Add v2 solver support for GNSS NAV ports and implement related tests
michaelbeutler Sep 16, 2025
473e92f
Refactor GNSS port tests to utilize SolverV2 for improved accuracy an…
michaelbeutler Sep 16, 2025
40ae225
Enhance health check in TestHTTPCmd for improved server readiness val…
michaelbeutler Sep 16, 2025
efdb065
Add test cases for TagXL decoder including Wi-Fi and GNSS messages
michaelbeutler Sep 16, 2025
80b3949
Enhance TagXL decoder with payload length checks and update movement …
michaelbeutler Sep 16, 2025
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
67 changes: 57 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- "**.go"
- "**.md"
- "**.mod"
- ".github/workflows/**.yaml"

jobs:
lint-and-format:
Expand All @@ -18,11 +19,43 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22
# Enable caching for Go modules
go-version: 1.24
cache: true
# Optional: Specify a cache-dependency path if your go.mod/go.sum are not at the root
# cache-dependency-path: go.sum

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install dependencies
run: |
pip install detect-secrets yamllint

- name: go mod tidy check
run: |
cp go.mod go.mod.prev
cp go.sum go.sum.prev
go mod tidy
diff -u go.mod.prev go.mod || (echo "::error file=go.mod::Run 'go mod tidy' and commit changes."; exit 1)
diff -u go.sum.prev go.sum || (echo "::error file=go.sum::Run 'go mod tidy' and commit changes."; exit 1)

- name: go fmt (no diffs allowed)
run: |
CHANGED=$(gofmt -s -l . || true)
if [ -n "$CHANGED" ]; then
echo "::error ::Run 'gofmt -s -w .' to format:"
echo "$CHANGED"
exit 1
fi

- name: go vet
run: go vet ./...

- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest

- name: staticcheck
run: $(go env GOPATH)/bin/staticcheck ./...

- name: Lint
uses: golangci/golangci-lint-action@v6
Expand All @@ -35,6 +68,25 @@ jobs:
- name: Check Prometheus metrics
run: make check-metrics

- name: Run yamllint
run: yamllint .

- name: Check for uncommitted changes
run: |
git diff --exit-code || (echo "::error::Generated code is not up to date. Run 'make generate' and commit changes."; exit 1)

- name: Detect secrets
run: |
echo "🔍 Scanning for secrets..."
if command -v detect-secrets >/dev/null 2>&1; then
detect-secrets scan --baseline .secrets.baseline --all-files || echo "Secret detection completed with findings"
if [ -f ".secrets.baseline" ]; then
detect-secrets audit .secrets.baseline --statistics || echo "Baseline audit completed"
fi
else
echo "detect-secrets not available, skipping secret scan (basic validation will still run)"
fi

test-coverage:
name: Test & Coverage 🧪
runs-on: ubuntu-latest
Expand All @@ -50,15 +102,10 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22
# Enable caching for Go modules
go-version: 1.24
cache: true
# Optional: Specify a cache-dependency path if your go.mod/go.sum are not at the root
# cache-dependency-path: go.sum

- name: Generate test coverage
# No explicit 'go mod download' needed if tests directly use modules,
# as the 'go test' command will use the cached modules.
run: go test ./... -coverprofile=./cover.out -covermode=atomic -coverpkg=./...

- name: Upload coverage reports to Codecov
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@

^decoder$
dist/
.vscode/
29 changes: 29 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.0
hooks:
- id: go-fmt
- id: go-imports
- id: no-go-testing
- id: golangci-lint
# - id: go-unit-tests

- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
args: [--config-file=.yamllint]

- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: ["--baseline", ".secrets.baseline"]
Loading