Skip to content

Commit

Permalink
Merge branch 'master' into vsftpd
Browse files Browse the repository at this point in the history
  • Loading branch information
jaqx0r committed Feb 12, 2019
2 parents fe395f7 + fb32298 commit a22c1f9
Show file tree
Hide file tree
Showing 191 changed files with 9,150 additions and 5,842 deletions.
69 changes: 17 additions & 52 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,24 @@
# instructions.
common-build: &common-build
working_directory: /go/src/github.com/google/mtail
environment:
TEST_RESULTS: /tmp/test-results
steps:
- checkout
- run: mkdir -p $TEST_RESULTS
- run: go get github.com/jstemmer/go-junit-report
- run: make vm/parser.go
- run: make install_coverage_deps
- run:
name: Run tests with race detector
command: |
trap "go-junit-report <${TEST_RESULTS}/go-test.out > ${TEST_RESULTS}/go-test-report.xml" EXIT
make testrace | tee ${TEST_RESULTS}/go-test.out
- run: make --debug smoke
- run: mkdir -p test-results
- run: mkdir -p workspace
- run: go get gotest.tools/gotestsum
- run:
name: Run tests with coverage
command: |
make gover.coverprofile
mkdir -p workspace
cp gover.coverprofile workspace/${CIRCLE_JOB}.coverprofile
name: Run tests and coverage with race detector
command: gotestsum --junitfile test-results/test-output.xml -- -race -coverprofile=workspace/${CIRCLE_JOB}.coverprofile --covermode=atomic -tags=integration -v -timeout=20m ./...
no_output_timeout: 20m
- persist_to_workspace:
root: workspace
paths:
- "*.coverprofile"
- run: make regtest
- run: make bench
- store_test_results:
path: /tmp/test-results
path: test-results
- store_artifacts:
path: test-results

# go* names anchors which define the Go versions to build with, merging the
# common-build alias above.
Expand All @@ -41,10 +32,6 @@ go1_10: &go1_10
<<: *common-build
docker:
- image: circleci/golang:1.10
go1_9: &go1_9
<<: *common-build
docker:
- image: circleci/golang:1.9

# concurrency* names anchors which define the the concurrency level to run
# tests with.
Expand Down Expand Up @@ -74,12 +61,6 @@ jobs:
<<: [*go1_10, *concurrency_2]
build-go1.10-1:
<<: [*go1_10, *concurrency_1]
build-go1.9-4:
<<: [*go1_9, *concurrency_4]
build-go1.9-2:
<<: [*go1_9, *concurrency_2]
build-go1.9-1:
<<: [*go1_9, *concurrency_1]

# Coverage collects all the coverage reports from each build and merges them,
# before sending off to Coveralls.
Expand All @@ -93,15 +74,15 @@ jobs:
- checkout
- attach_workspace:
at: /tmp/workspace
- run: make install_coverage_deps
- run:
name: Generate coverage
command: |
gover /tmp/workspace
go tool cover -html=gover.coverprofile -o coverage.html
goveralls -coverprofile=gover.coverprofile -service=circle-ci
ls -lR /tmp/workspace
go get github.com/sozorogami/gover
gover /tmp/workspace coverprofile
make --debug coverage.html upload_to_coveralls
- store_artifacts:
path: gover.coverprofile
path: coverprofile
destination: coverage
- store_artifacts:
path: coverage.html
Expand All @@ -115,8 +96,7 @@ jobs:
- checkout
- attach_workspace:
at: /tmp/workspace
- run: make vm/parser.go
- run: make crossbuild
- run: make --debug crossbuild
- run: sha1sum build/*
- store_artifacts:
path: build/
Expand All @@ -137,7 +117,7 @@ tag-filter: &tag-filter
# of the build matrix change.
workflows:
version: 2
build:
build_and_deliver:
jobs:
- build-go1.11-4:
<<: *tag-filter
Expand All @@ -161,18 +141,6 @@ workflows:
<<: *tag-filter
requires:
- build-go1.11-4
- build-go1.9-4:
<<: *tag-filter
requires:
- build-go1.11-4
- build-go1.9-2:
<<: *tag-filter
requires:
- build-go1.11-4
- build-go1.9-1:
<<: *tag-filter
requires:
- build-go1.11-4
- coverage:
<<: *tag-filter
requires:
Expand All @@ -182,9 +150,6 @@ workflows:
- build-go1.10-4
- build-go1.10-2
- build-go1.10-1
- build-go1.9-4
- build-go1.9-2
- build-go1.9-1
- delivery:
requires:
- coverage
Expand Down
9 changes: 5 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
vm/parser.go -diff -merge
vm/parser.go linguist-generated=true
vm/y.output -diff -merge
vm/y.output linguist-generated=true
internal/vm/parser/parser.go -diff -merge
internal/vm/parser/parser.go linguist-generated=true
internal/vm/parser/y.output -diff -merge
internal/vm/parser/y.output linguist-generated=true
logo.png binary
internal/mtail/logo.ico binary
.gitattributes export-ignore
.gitignore export-ignore
docs/* linguist-documentation
11 changes: 2 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,19 @@ _gotest_.6
_test
_testmain.6
_testmain.go
mtail.test
fuzz/fuzz
fuzzout
emgen/emgen
foo.log
/watcher/watcher.test
/vm/vm.test
*.test
/coverage.html
*.coverprofile
/exporter/exporter.test
/.dep-stamp
/.build-dep-stamp
/.gen-dep-stamp
/.*dep-stamp
/cpu.out
/mem.out
/build
/.crossbuild-dep-stamp
/.ghi.yml
/vm-fuzz.zip
workdir/*
/.fuzz-dep-stamp
/tests/regtest
/.pc
3 changes: 1 addition & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ test:
build:
stage: build
script:
- make install
- cp -v ${GOPATH}/bin/mtail ${CI_PROJECT_DIR}/build/mtail
- PREFIX=${CI_PROJECT_DIR}/build make install
artifacts:
expire_in: 1 week
when: on_success
Expand Down
48 changes: 48 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
service:
prepare:
- make install_deps

run:
tests: true
build-tags:
- integration
skip-files:
- internal/vm/parser/parser.go

linters-settings:
govet:
check-shadowing: true

linters:
enable-all: true
disable:
- maligned
- megacheck
- lll
- gocyclo
- unparam
# Not sure what this is telling me yet.
- scopelint
# How dare you tell me not to use inits.
- gochecknoinits
# Flags are fine, as are test tables.
- gochecknoglobals

issues:
max-per-linter: 0
max-same: 0
exclude-use-default: true
exclude:
# # Captured by errcheck.
# - '^(G104|G204):'
# # Very commonly not checked.
# - 'Error return value of .(.*\.Help|.*\.MarkFlagRequired|(os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv). is not checked'
# #- 'exported method (.*\.MarshalJSON|.*\.UnmarshalJSON|.*\.EntityURN|.*\.GoString|.*\.Pos) should have comment or be unexported'
# If you liked it you shoulda put a gofix on it.
- 'composite literal uses unkeyed fields'
# I like shadowing err
- 'declaration of "err" shadows declaration'
# #- 'bad syntax for struct tag key'
# #- 'bad syntax for struct tag pair'
# goyacc generated error in three locations
- 'this value of `mtailDollar.* is never used'
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit a22c1f9

Please sign in to comment.