Bump k8s.io/api from 0.0.0-20190620084959-7cf5895f2711 to 0.28.0-alpha.4 #1185
Workflow file for this run
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
name: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ${{ matrix.runner }} | |
strategy: | |
fail-fast: false | |
matrix: | |
go: [ '1.20' ] | |
arch: [ amd64 ] | |
runner: [ ubuntu-latest ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go }} | |
cache: true | |
- name: Build | |
env: | |
GOARCH: ${{ matrix.arch }} | |
GOFLAGS: ${{ matrix.flags }} | |
run: go build ./... | |
- name: Test | |
env: | |
GOARCH: ${{ matrix.arch }} | |
GOFLAGS: ${{ matrix.flags }} | |
LOG_LEVEL: error | |
run: go test -coverprofile=profile.out -covermode=atomic -coverpkg=./... ./... | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage | |
path: profile.out | |
if-no-files-found: error | |
retention-days: 1 | |
e2e_test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
cache: true | |
- name: Run Kafka | |
run: docker-compose -f ./e2e/kafka_file/docker-compose-kafka.yml up -d | |
- name: Run Clickhouse | |
run: docker-compose -f ./e2e/file_clickhouse/docker-compose.yml up -d | |
- name: E2E | |
run: go test ./e2e -coverprofile=profile_e2e.out -covermode=atomic -tags=e2e_new -timeout=3m -coverpkg=./... | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage | |
path: profile_e2e.out | |
if-no-files-found: error | |
retention-days: 1 | |
upload: | |
runs-on: ubuntu-latest | |
needs: | |
- test | |
- e2e_test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: coverage | |
- name: Send coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
files: profile.out, profile_e2e.out | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
cache: true | |
- name: Lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: latest | |
only-new-issues: false | |
args: --timeout 5m | |
# Package/build cache already provided above. | |
# | |
# Disable module cache. | |
skip-pkg-cache: true | |
# Disable build cache. | |
skip-build-cache: true | |
check-generate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
cache: true | |
- name: Generate doc | |
run: make gen-doc | |
- name: Generate mocks | |
run: make mock | |
- name: Go generate | |
run: go generate ./... | |
- name: Check git diff | |
run: git diff --exit-code | |
check-mod: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
cache: true | |
- name: Download dependencies | |
run: go mod download && go mod tidy | |
- name: Verify modules | |
run: go mod verify | |
- name: Check git diff | |
run: git diff --exit-code |