fix: empty string when new newline at the end of stdin (#96) #161
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Quality Check | |
on: | |
push: | |
pull_request: | |
jobs: | |
test: | |
name: Test and coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ^1.21 | |
- name: Get dependencies | |
run: | | |
go get -v -t -d ./... | |
- name: go test | |
run: go test -v -covermode=count -coverprofile=coverage.out ./... | |
- name: Convert coverage.out to coverage.lcov | |
uses: jandelgado/[email protected] | |
- name: Coveralls | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: coverage.lcov | |
vet: | |
name: go vet and lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ^1.21 | |
- name: Get dependencies | |
run: | | |
go get -v -t -d ./... | |
go install golang.org/x/lint/golint@latest | |
- name: go vet | |
run: go vet ./... | |
- name: go lint | |
run: golint -set_exit_status ./... | |
golangci: | |
name: golangci lint check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.54.2 |