-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1385 from mrueg/release-1.9-bp
Backports to 1.9 for new 1.9.8 release
- Loading branch information
Showing
10 changed files
with
233 additions
and
120 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 |
---|---|---|
@@ -0,0 +1,197 @@ | ||
name: continuous-integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- release* | ||
tags: | ||
- v1.* | ||
- v2.* | ||
pull_request: | ||
branches: | ||
- master | ||
- release* | ||
|
||
env: | ||
E2E_SETUP_KIND: yes | ||
E2E_SETUP_KUBECTL: yes | ||
SUDO: sudo | ||
|
||
jobs: | ||
ci-go-lint: | ||
name: ci-go-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.15 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup environment | ||
run: | | ||
go get -v -t -d ./... | ||
make install-tools | ||
- name: Lint | ||
run: | | ||
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0 | ||
make lint | ||
ci-validate-manifests: | ||
name: ci-validate-manifests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.15 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup environment | ||
run: | | ||
go get -v -t -d ./... | ||
make install-tools | ||
- name: Validate generated manifests | ||
run: | | ||
make validate-manifests | ||
ci-validate-go-modules: | ||
name: ci-validate-go-modules | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.15 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup environment | ||
run: | | ||
go get -v -t -d ./... | ||
make install-tools | ||
- name: Validate vendor is in sync with go modules | ||
run: | | ||
make validate-modules | ||
ci-validate-docs: | ||
name: ci-validate-docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.15 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup environment | ||
run: | | ||
go get -v -t -d ./... | ||
make install-tools | ||
- name: Check that all metrics are documented | ||
run: | | ||
make doccheck | ||
ci-unit-tests: | ||
name: ci-unit-tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.15 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup environment | ||
run: | | ||
go get -v -t -d ./... | ||
make install-tools | ||
- name: Unit tests | ||
run: | | ||
make test-unit | ||
ci-benchmark-tests: | ||
name: ci-benchmark-tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.15 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup environment | ||
run: | | ||
go get -v -t -d ./... | ||
make install-tools | ||
- name: Benchmark tests | ||
run: | | ||
make test-benchmark-compare | ||
ci-build-kube-state-metrics: | ||
name: ci-build-kube-state-metrics | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.15 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup environment | ||
run: | | ||
go get -v -t -d ./... | ||
make install-tools | ||
- name: Build | ||
run: | | ||
make build | ||
ci-e2e-tests: | ||
name: ci-e2e-tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.15 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup environment | ||
run: | | ||
go get -v -t -d ./... | ||
make install-tools | ||
- name: End-to-end tests | ||
run: | | ||
REGISTRY="quay.io/coreos" make e2e |
This file was deleted.
Oops, something went wrong.
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
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,16 +1,15 @@ | ||
# End2end testsuite | ||
|
||
This folder contains simple e2e tests. | ||
When launched it spins up a kubernetes cluster using minikube, creates several kubernetes resources and launches a kube-state-metrics deployment. | ||
Then, it downloads kube-state-metrics' metrics and examines validity using `promtool` tool. | ||
When launched, it spins up a kubernetes cluster using [kind](https://kind.sigs.k8s.io/), creates several kubernetes resources and launches a kube-state-metrics deployment. | ||
Then, it runs verification tests: check metrics' presence, lint metrics, check service health, etc. | ||
|
||
The testsuite is run automatically using Travis. | ||
The test suite is run automatically using Github Actions. | ||
|
||
## Running locally | ||
|
||
To run the e2e tests locally run the following command: | ||
|
||
```bash | ||
export MINIKUBE_DRIVER=virtualbox # choose minikube's driver of your choice | ||
./tests/e2e.sh | ||
``` |
Oops, something went wrong.