mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-05-19 22:23:30 +02:00
Set up code coverage within Travis for Code Climate (#533)
* Set up code coverage within Travis for Code Climate * Include CodeClimate badges on ReadMe
This commit is contained in:
parent
be9eaaeb48
commit
24cdfa68b6
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,6 +6,7 @@ release
|
|||||||
*.exe
|
*.exe
|
||||||
.env
|
.env
|
||||||
.bundle
|
.bundle
|
||||||
|
c.out
|
||||||
|
|
||||||
# Go.gitignore
|
# Go.gitignore
|
||||||
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||||
|
@ -1,12 +1,20 @@
|
|||||||
language: go
|
language: go
|
||||||
go:
|
go:
|
||||||
- 1.14.x
|
- 1.14.x
|
||||||
|
env:
|
||||||
|
- COVER=true
|
||||||
install:
|
install:
|
||||||
# Fetch dependencies
|
# Fetch dependencies
|
||||||
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin v1.24.0
|
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin v1.24.0
|
||||||
- GO111MODULE=on go mod download
|
- GO111MODULE=on go mod download
|
||||||
|
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
||||||
|
- chmod +x ./cc-test-reporter
|
||||||
|
before_script:
|
||||||
|
- ./cc-test-reporter before-build
|
||||||
script:
|
script:
|
||||||
- make test
|
- make test
|
||||||
|
after_script:
|
||||||
|
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT -t gocov
|
||||||
sudo: false
|
sudo: false
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
## Changes since v5.1.1
|
## Changes since v5.1.1
|
||||||
|
|
||||||
|
- [#533](https://github.com/oauth2-proxy/oauth2-proxy/pull/487) Set up code coverage within Travis for Code Climate (@JoelSpeed)
|
||||||
- [#514](https://github.com/oauth2-proxy/oauth2-proxy/pull/514) Add basic string functions to templates
|
- [#514](https://github.com/oauth2-proxy/oauth2-proxy/pull/514) Add basic string functions to templates
|
||||||
- [#524](https://github.com/oauth2-proxy/oauth2-proxy/pull/524) Sign cookies with SHA256 (@NickMeves)
|
- [#524](https://github.com/oauth2-proxy/oauth2-proxy/pull/524) Sign cookies with SHA256 (@NickMeves)
|
||||||
- [#515](https://github.com/oauth2-proxy/oauth2-proxy/pull/515) Drop configure script in favour of native Makefile env and checks (@JoelSpeed)
|
- [#515](https://github.com/oauth2-proxy/oauth2-proxy/pull/515) Drop configure script in favour of native Makefile env and checks (@JoelSpeed)
|
||||||
|
6
Makefile
6
Makefile
@ -13,6 +13,10 @@ MINIMUM_SUPPORTED_GO_MAJOR_VERSION = 1
|
|||||||
MINIMUM_SUPPORTED_GO_MINOR_VERSION = 14
|
MINIMUM_SUPPORTED_GO_MINOR_VERSION = 14
|
||||||
GO_VERSION_VALIDATION_ERR_MSG = Golang version is not supported, please update to at least $(MINIMUM_SUPPORTED_GO_MAJOR_VERSION).$(MINIMUM_SUPPORTED_GO_MINOR_VERSION)
|
GO_VERSION_VALIDATION_ERR_MSG = Golang version is not supported, please update to at least $(MINIMUM_SUPPORTED_GO_MAJOR_VERSION).$(MINIMUM_SUPPORTED_GO_MINOR_VERSION)
|
||||||
|
|
||||||
|
ifeq ($(COVER),true)
|
||||||
|
TESTCOVER ?= -coverprofile c.out
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: lint $(BINARY)
|
all: lint $(BINARY)
|
||||||
|
|
||||||
@ -65,7 +69,7 @@ docker-push-all: docker-push
|
|||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: lint
|
test: lint
|
||||||
GO111MODULE=on $(GO) test -v -race ./...
|
GO111MODULE=on $(GO) test $(TESTCOVER) -v -race ./...
|
||||||
|
|
||||||
.PHONY: release
|
.PHONY: release
|
||||||
release: lint test
|
release: lint test
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
[](https://goreportcard.com/report/github.com/oauth2-proxy/oauth2-proxy)
|
[](https://goreportcard.com/report/github.com/oauth2-proxy/oauth2-proxy)
|
||||||
[](https://godoc.org/github.com/oauth2-proxy/oauth2-proxy)
|
[](https://godoc.org/github.com/oauth2-proxy/oauth2-proxy)
|
||||||
[](./LICENSE)
|
[](./LICENSE)
|
||||||
|
[](https://codeclimate.com/github/oauth2-proxy/oauth2-proxy/maintainability)
|
||||||
|
[](https://codeclimate.com/github/oauth2-proxy/oauth2-proxy/test_coverage)
|
||||||
|
|
||||||
A reverse proxy and static file server that provides authentication using Providers (Google, GitHub, and others)
|
A reverse proxy and static file server that provides authentication using Providers (Google, GitHub, and others)
|
||||||
to validate accounts by email, domain or group.
|
to validate accounts by email, domain or group.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user