Skip to content

Commit

Permalink
replace msgpack library (#74)
Browse files Browse the repository at this point in the history
* replace msgpack library

* todo: fix time printing

* remove time test

* ci: enable cgo

* ci: C deps

* sudo

* ci: install cmetrics

* include tests from pr #68

* fix test

* test utl
  • Loading branch information
nicolasparada authored Jun 6, 2024
1 parent b080a30 commit 21668b6
Show file tree
Hide file tree
Showing 20 changed files with 531 additions and 388 deletions.
11 changes: 9 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "gomod: "

- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand All @@ -8,8 +15,8 @@ updates:
prefix: "workflows: "

- package-ecosystem: "docker"
directory: "/"
directory: "/testdata"
schedule:
interval: "weekly"
interval: "weekly"
commit-message:
prefix: "dockerfile: "
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"

- name: Go mod download
run: go mod download

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.CI_USERNAME }}
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
- name: Upload coverage to Codecov
if: ${{ github.event_name != 'pull_request' }}
uses: codecov/codecov-action@v4.4.1
uses: codecov/codecov-action@v4
with:
file: ./coverage.out
flags: ${{ runner.os }}
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,17 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install cmetrics
env:
TARGETARCH: amd64
CMETRICS_VERSION: "0.9.0"
CMETRICS_RELEASE: v0.9.0
run: |
wget https://github.com/fluent/cmetrics/releases/download/${CMETRICS_RELEASE}/cmetrics_${CMETRICS_VERSION}_${TARGETARCH}-headers.deb
wget https://github.com/fluent/cmetrics/releases/download/${CMETRICS_RELEASE}/cmetrics_${CMETRICS_VERSION}_${TARGETARCH}.deb
sudo dpkg -i *.deb
rm *.deb
shell: bash

- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
uses: reviewdog/action-golangci-lint@v2
37 changes: 17 additions & 20 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ linters-settings:
gocyclo:
min-complexity: 25
govet:
check-shadowing: true
shadow:
strict: true
misspell:
locale: US
gomnd:
mnd:
ignored-numbers:
- 2 #used for word splitting.
gocognit:
Expand All @@ -34,16 +35,13 @@ linters:
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
disable-all: true
enable:
- deadcode
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- structcheck
- typecheck
- unused
- varcheck
- bodyclose
- dupl
- exportloopref
Expand All @@ -57,10 +55,9 @@ linters:
- godot
- gofumpt
- revive
- gomnd
- mnd
- goprintffuncname
- gosec
- ifshort
- misspell
- noctx
- nolintlint
Expand All @@ -75,16 +72,16 @@ linters:
issues:
exclude-use-default: false
exclude-rules:
- linters:
- funlen
- stylecheck
- gocyclo
- gocognit
- revive
- dupl
- goconst
- errcheck
- bodyclose
- gomnd
- thelper
path: '.*test.*.go'
- linters:
- funlen
- stylecheck
- gocyclo
- gocognit
- revive
- dupl
- goconst
- errcheck
- bodyclose
- mnd
- thelper
path: ".*test.*.go"
Loading

0 comments on commit 21668b6

Please sign in to comment.