-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add method to convert genders to advantage known genders
Signed-off-by: Kathurima Kimathi <[email protected]>
- Loading branch information
1 parent
83bef68
commit d716724
Showing
4 changed files
with
80 additions
and
26 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,51 +8,55 @@ env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
golangci: | ||
strategy: | ||
matrix: | ||
go-version: [1.21.x] | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- uses: actions/checkout@v3 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest | ||
|
||
lint_and_test: | ||
needs: [golangci] | ||
strategy: | ||
matrix: | ||
go-version: [1.16.x] | ||
go-version: [1.21.x] | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 80 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Install Go dependencies | ||
run: | | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.37.1 | ||
go get -u github.com/kisielk/errcheck | ||
go get -u golang.org/x/lint/golint | ||
go get -u honnef.co/go/tools/cmd/staticcheck | ||
go get -u github.com/axw/gocov/gocov | ||
go get -u github.com/securego/gosec/cmd/gosec | ||
go get -u github.com/ory/go-acc | ||
go get -u github.com/client9/misspell/cmd/misspell | ||
go get -u github.com/gordonklaus/ineffassign | ||
go get github.com/fzipp/gocyclo | ||
go get github.com/stretchr/testify/[email protected] | ||
go mod download | ||
go get github.com/axw/gocov/gocov | ||
go get github.com/ory/go-acc | ||
go install github.com/ory/go-acc | ||
go install github.com/axw/gocov/gocov | ||
go get github.com/savannahghi/[email protected] | ||
- name: Run lint and test | ||
- name: Run tests | ||
run: | | ||
staticcheck ./... | ||
go fmt $(go list ./... | grep -v /vendor/) | ||
go vet $(go list ./... | grep -v /vendor/) | ||
golint -set_exit_status $(go list ./... | grep -v /vendor/) | ||
errcheck -ignore 'os:.*,' $(go list ./... | grep -v /vendor/) | ||
misspell -error . | ||
gosec -exclude=G304,G101 ./... | ||
go-acc -o coverage.txt --ignore generated,cmd ./... -- -timeout 60m | ||
grep -v "generated.go" coverage.txt > coverage.out | ||
go-acc -o coverage.txt --ignore generated,cmd,graph ./... -- -timeout 60m | ||
grep -v "generated.go" coverage.txt | grep -v "_gen.go" | grep -v "_mock.go" | grep -v "*mock.go" | grep -v "mocks.go" | grep -v "*resolver*go" | grep -v "server.go" | grep -v "*.html" > coverage.out | ||
go tool cover -html=coverage.out -o coverage.html | ||
gocov convert coverage.out > coverage.json | ||
gocov report coverage.json > coverage_report.txt | ||
tail coverage_report.txt | ||
- name: Install goveralls | ||
env: | ||
GO111MODULE: off | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
module github.com/savannahghi/enumutils | ||
|
||
go 1.16 | ||
go 1.22.1 | ||
|
||
require github.com/stretchr/testify v1.7.0 | ||
|
||
require ( | ||
github.com/davecgh/go-spew v1.1.0 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect | ||
) |