Skip to content

Commit

Permalink
Merge pull request #7 from madflojo/ci
Browse files Browse the repository at this point in the history
chore: cleaning up docs and ci
  • Loading branch information
madflojo committed Jan 25, 2024
2 parents 6499601 + 7af7ab1 commit 0640d42
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 31 deletions.
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

0 comments on commit 0640d42

Please sign in to comment.