Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: pull request checks
name: pull request - build and unit tests

on:
push:
Expand All @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@v2
- name: run build
run: make build
- name: run tests
- name: run unit tests
run: make tests-unit
- name: upload coverage to codecov.io
uses: codecov/codecov-action@v2
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/pull_request_e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: pull request - e2e tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
name: test
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.17']

steps:
- name: install make
run: sudo apt-get install make
- name: set up go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: checkout
uses: actions/checkout@v2
- name: run build
run: make build
- name: run end-to-end tests
run: make tests-e2e
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,11 @@ tests-unit: validate_go ## Unit tests
go test -p 1 -race -coverpkg=./... -covermode=atomic -coverprofile=/tmp/coverage.out $$(go list ./... | grep -v /e2e)

.PHONY: tests-e2e
tests-e2e: validate_go ## End-to-end tests
go test -v -timeout 1200s -p 1 -race -coverpkg=./... -covermode=atomic -coverprofile=/tmp/coverage.out $$(go list ./... | grep /e2e)
tests-e2e: validate_go $(KIND) ## End-to-end tests
go test -v -timeout 1200s -race $$(go list ./... | grep /e2e)

.PHONY: tests-all
tests-all: validate_go ## All tests
go test -v -timeout 1200s -p 1 -race -coverpkg=./... -covermode=atomic -coverprofile=/tmp/coverage.out ./...
tests-all: validate_go tests-unit tests-e2e ## All tests

# note: to review profile execute: go tool pprof -web /tmp/flowlogs-pipeline-cpu-profile.out (make sure graphviz is installed)
.PHONY: benchmarks
Expand Down
8 changes: 4 additions & 4 deletions contrib/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ WORKDIR /app
COPY go.mod .
COPY go.sum .

# Download modules
RUN go mod download
RUN go mod vendor

COPY cmd/ cmd/
COPY pkg/ pkg/
COPY .bingo/ .bingo/
COPY .git/ .git/
COPY Makefile Makefile

# Download modules
RUN go mod download
RUN go mod vendor

RUN make build_code

# final stage
Expand Down
16 changes: 11 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ require (
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.10.1
github.com/stretchr/testify v1.7.0
github.com/vladimirvivien/gexe v0.1.1
github.com/vmware/go-ipfix v0.5.12
golang.org/x/net v0.0.0-20220225172249-27dd8689420f
google.golang.org/protobuf v1.27.1
Expand All @@ -29,12 +30,17 @@ require (
k8s.io/api v0.23.4
k8s.io/apimachinery v0.23.4
k8s.io/client-go v0.23.4
sigs.k8s.io/e2e-framework v0.0.6
)

require (
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/alessio/shellescape v1.4.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.2.0 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-kit/log v0.2.0 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
Expand All @@ -45,18 +51,17 @@ require (
github.com/google/gofuzz v1.1.0 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/imdario/mergo v0.3.5 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/klauspost/compress v1.13.6 // indirect
github.com/libp2p/go-reuseport v0.1.0 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/onsi/ginkgo v1.16.2 // indirect
github.com/onsi/gomega v1.13.0 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
github.com/pkg/errors v0.9.1 // indirect
Expand All @@ -70,7 +75,6 @@ require (
github.com/stretchr/objx v0.2.0 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/goleak v1.1.11-0.20210813005559-691160354723 // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
Expand All @@ -87,7 +91,9 @@ require (
k8s.io/klog/v2 v2.30.0 // indirect
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
sigs.k8s.io/controller-runtime v0.11.0 // indirect
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
sigs.k8s.io/kind v0.11.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading