mirror of
https://github.com/emirpasic/gods
synced 2024-11-13 19:12:07 +00:00
commit
057bca0d1c
70
.circleci/config.yml
Normal file
70
.circleci/config.yml
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
version: 2.1
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
parameters:
|
||||||
|
version:
|
||||||
|
type: string
|
||||||
|
default: latest
|
||||||
|
docker:
|
||||||
|
- image: cimg/go:<<parameters.version>>
|
||||||
|
environment:
|
||||||
|
TEST_RESULTS: /tmp/test-results
|
||||||
|
working_directory: ~/gods
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
name: Print Go version (go version)
|
||||||
|
command: |
|
||||||
|
go version
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
name: Run tests
|
||||||
|
command: |
|
||||||
|
mkdir -p $TEST_RESULTS
|
||||||
|
go install gotest.tools/gotestsum@latest
|
||||||
|
go test -v ./... | go tool test2json > $TEST_RESULTS/test2json-output.json
|
||||||
|
gotestsum --junitfile $TEST_RESULTS/gotestsum-report.xml
|
||||||
|
- run:
|
||||||
|
name: Calculate test coverage
|
||||||
|
command: |
|
||||||
|
mkdir -p $TEST_RESULTS
|
||||||
|
go test -coverprofile=c.out ./... > /dev/null
|
||||||
|
go tool cover -html=c.out -o coverage.html
|
||||||
|
mv coverage.html $TEST_RESULTS
|
||||||
|
- run:
|
||||||
|
name: Lint (golint)
|
||||||
|
command: |
|
||||||
|
go install golang.org/x/lint/golint@latest
|
||||||
|
golint -set_exit_status ./...
|
||||||
|
- run:
|
||||||
|
name: Enforce formatted code (go fmt)
|
||||||
|
command: |
|
||||||
|
! go fmt ./... 2>&1 | read
|
||||||
|
- run:
|
||||||
|
name: Examine and report suspicious constructs (go vet)
|
||||||
|
command: |
|
||||||
|
go vet -v ./...
|
||||||
|
- run:
|
||||||
|
name: Calculate cyclomatic complexity (gocyclo)
|
||||||
|
command: |
|
||||||
|
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
|
||||||
|
gocyclo -avg -over 15 ../gods
|
||||||
|
- run:
|
||||||
|
name: Check for unchecked errors (errcheck)
|
||||||
|
command: |
|
||||||
|
go install github.com/kisielk/errcheck@latest
|
||||||
|
errcheck ./...
|
||||||
|
- store_artifacts:
|
||||||
|
path: /tmp/test-results
|
||||||
|
destination: raw-test-output
|
||||||
|
- store_test_results:
|
||||||
|
path: /tmp/test-results
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
test:
|
||||||
|
jobs:
|
||||||
|
- test:
|
||||||
|
matrix:
|
||||||
|
parameters:
|
||||||
|
# To test with and without generics (versions prior to 1.18)
|
||||||
|
version: ["1.18", "1.17"]
|
27
.travis.yml
27
.travis.yml
@ -1,27 +0,0 @@
|
|||||||
language: go
|
|
||||||
arch:
|
|
||||||
- amd64
|
|
||||||
- ppc64le
|
|
||||||
go:
|
|
||||||
- 1.2.x
|
|
||||||
- 1.3.x
|
|
||||||
- 1.4.x
|
|
||||||
- 1.5.x
|
|
||||||
- 1.6.x
|
|
||||||
- 1.7.x
|
|
||||||
- 1.8.x
|
|
||||||
- 1.9.x
|
|
||||||
- 1.10.x
|
|
||||||
- 1.11.x
|
|
||||||
- 1.12.x
|
|
||||||
- 1.13.x
|
|
||||||
- 1.14.x
|
|
||||||
- tip
|
|
||||||
jobs:
|
|
||||||
exclude: # Excluded for power support as the lower versions are not supported
|
|
||||||
- arch: ppc64le
|
|
||||||
go: 1.2.x
|
|
||||||
- arch: ppc64le
|
|
||||||
go: 1.3.x
|
|
||||||
- arch: ppc64le
|
|
||||||
go: 1.4.x
|
|
@ -1,4 +1,4 @@
|
|||||||
[![GoDoc](https://godoc.org/github.com/emirpasic/gods?status.svg)](https://godoc.org/github.com/emirpasic/gods) [![Build Status](https://travis-ci.org/emirpasic/gods.svg)](https://travis-ci.org/emirpasic/gods) [![Go Report Card](https://goreportcard.com/badge/github.com/emirpasic/gods)](https://goreportcard.com/report/github.com/emirpasic/gods) [![PyPI](https://img.shields.io/pypi/l/Django.svg?maxAge=2592000)](https://github.com/emirpasic/gods/blob/master/LICENSE)
|
[![GoDoc](https://godoc.org/github.com/emirpasic/gods?status.svg)](https://godoc.org/github.com/emirpasic/gods) [![Build Status](https://circleci.com/gh/emirpasic/gods/tree/master.svg?style=shield)](https://circleci.com/gh/emirpasic/gods?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/emirpasic/gods)](https://goreportcard.com/report/github.com/emirpasic/gods) [![PyPI](https://img.shields.io/pypi/l/Django.svg?maxAge=2592000)](https://github.com/emirpasic/gods/blob/master/LICENSE)
|
||||||
|
|
||||||
# GoDS (Go Data Structures)
|
# GoDS (Go Data Structures)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user