Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: cleaning up docs and ci #7

Merged
merged 3 commits into from
Jan 25, 2024
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
10 changes: 5 additions & 5 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
name: golangci-lint
name: lint
on:
push:
tags:
- v*
branches:
- master
- actions
- main
pull_request:
jobs:
golangci:
name: lint
name: golangci
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.29
version: latest

# Optional: working directory, useful for monorepos
# working-directory: somedir

# Optional: golangci-lint command line arguments.
# args: --issues-exit-code=0
args: -E misspell -E revive -E errname -E gofmt

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,32 @@ on:
tags:
- v*
branches:
- master
- actions
- main
pull_request:

jobs:

tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.16'
- name: Execute Tests
run: make tests
go-version: 1.16

- name: Install cover
run: go get golang.org/x/tools/cmd/cover

- name: Install goveralls
run: go get -u github.com/mattn/goveralls

- name: Test
run: go test --race -v -covermode=atomic -coverprofile=coverage.out ./...

- name: Update Coveralls
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=coverage.out -service=github
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

tests:
@echo "Running Tests with Coverage Report"
go test -v -covermode=count -coverprofile=coverage.out ./...
go test -v -covermode=atomic -race -coverprofile=coverage.out ./...
go tool cover -html=./coverage.out -o ./coverage.html

benchmarks:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func main() {
msg := []byte("This is a message")

// Encoding Example
mli, err := simplemli.Encode(simplemli.2I, len(msg))
mli, err := simplemli.Encode(simplemli.MLI2I, len(msg))
if err != nil {
// Do something
}
Expand All @@ -44,7 +44,7 @@ func main() {
}

// Decoding Example
length, err := simplemli.Decode(simplemli.2I, &b)
length, err := simplemli.Decode(simplemli.MLI2I, &b)
if err != nil {
// Do something
}
Expand Down
4 changes: 2 additions & 2 deletions mli.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Usage:
msg := []byte("This is a message")

// Encoding Example
mli, err := simplemli.Encode(simplemli.2I, len(msg))
mli, err := simplemli.Encode(simplemli.MLI2I, len(msg))
if err != nil {
// Do something
}
Expand All @@ -51,7 +51,7 @@ Usage:
}

// Decoding Example
length, err := simplemli.Decode(simplemli.2I, &b)
length, err := simplemli.Decode(simplemli.MLI2I, &b)
if err != nil {
// Do something
}
Expand Down
Loading