Skip to content

Commit

Permalink
Implement support for release push and parallel jobs
Browse files Browse the repository at this point in the history
Implement support for release push and parallel jobs
  • Loading branch information
tariq1890 committed Aug 7, 2020
1 parent eb57580 commit 1e98570
Showing 1 changed file with 139 additions and 6 deletions.
145 changes: 139 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
name: Build
name: Kube-state-metrics CI checks

on:
push:
branches: [ master ]
branches:
- master
- release*
tags:
- v1.*
- v2.*
pull_request:
branches: [ master ]
branches:
- master
- release*

env:
E2E_SETUP_KIND: yes
E2E_SETUP_KUBECTL: yes
SUDO: sudo

jobs:
build:
name: Build
job1:
name: Run Go Lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
Expand All @@ -25,7 +32,7 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Install CI
- name: Setup environment
run: |
go get -v -t -d ./...
make install-tools
Expand All @@ -35,30 +42,156 @@ jobs:
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0
make lint
job2:
name: Validate Manifests
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.14
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
job3:
name: Validate Go Modules
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.14
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
job4:
name: Validate Documentation
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.14
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
job5:
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.14
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
job6:
name: Run Benchmark Tests
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.14
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
job7:
name: Build Kube-State-Metrics
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.14
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
job8:
name: Run E2E tests
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.14
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

0 comments on commit 1e98570

Please sign in to comment.