Import upstream version 0.0~git20181029.f5cfe54, md5 b9f4c4f2d0a1fae22ed587034ff76b56
Debian Janitor
4 years ago
|
0 |
# Golang CircleCI 2.0 configuration file
|
|
1 |
#
|
|
2 |
# Check https://circleci.com/docs/2.0/language-go/ for more details
|
|
3 |
version: 2
|
|
4 |
jobs:
|
|
5 |
build:
|
|
6 |
docker:
|
|
7 |
- image: circleci/golang:1.10-stretch
|
|
8 |
|
|
9 |
working_directory: /go/src/github.com/satta/ifplugo
|
|
10 |
steps:
|
|
11 |
- checkout
|
|
12 |
- run:
|
|
13 |
name: Add stretch-backports
|
|
14 |
command: 'echo "deb http://ftp.debian.org/debian stretch-backports main" | sudo tee -a /etc/apt/sources.list.d/backports.list'
|
|
15 |
- run:
|
|
16 |
name: Install apt dependencies
|
|
17 |
command: 'sudo apt-get update && sudo apt-get -t stretch-backports install libdaemon-dev -y'
|
|
18 |
|
|
19 |
- run: go get -t -v ./...
|
|
20 |
- run: go test -v ./...
|
0 | |
language: go
|
1 | |
|
2 | |
addons:
|
3 | |
apt:
|
4 | |
packages:
|
5 | |
- libdaemon-dev
|
6 | |
|
7 | |
go:
|
8 | |
- 1.9
|
9 | |
- master
|
10 | |
|
11 | |
matrix:
|
12 | |
# It's ok if our code fails on unstable development versions of Go.
|
13 | |
allow_failures:
|
14 | |
- go: master
|
15 | |
# Don't wait for tip tests to finish. Mark the test run green if the
|
16 | |
# tests pass on the stable versions of Go.
|
17 | |
fast_finish: true
|
18 | |
|
19 | |
# Anything in before_script that returns a nonzero exit code will
|
20 | |
# flunk the build and immediately stop. It's sorta like having
|
21 | |
# set -e enabled in bash.
|
22 | |
before_script:
|
23 | |
- GO_FILES=$(find . -iname '*.go' -type f | grep -v /vendor/) # All the .go files, excluding vendor/
|
24 | |
- go get github.com/golang/lint/golint # Linter
|
25 | |
- go get honnef.co/go/tools/cmd/megacheck # Badass static analyzer/linter
|
26 | |
- go get github.com/fzipp/gocyclo
|
27 | |
|
28 | |
# script always run to completion (set +e). All of these code checks are must haves
|
29 | |
# in a modern Go project.
|
30 | |
script:
|
31 | |
- test -z $(gofmt -s -l $GO_FILES) # Fail if a .go file hasn't been formatted with gofmt
|
32 | |
- go test -v -race ./... # Run all the tests with the race detector enabled
|
33 | |
- go vet ./... # go vet is the official Go static analyzer
|
34 | |
- megacheck ./... # "go vet on steroids" + linter
|
35 | |
- gocyclo -over 19 $GO_FILES # forbid code with huge functions
|
36 | |
- golint -set_exit_status $(go list ./...) # one last linter
|
0 | 0 |
# ifplugo
|
1 | 1 |
|
2 | 2 |
[![GoDoc](https://godoc.org/github.com/satta/ifplugo?status.svg)](http://godoc.org/github.com/satta/ifplugo)
|
3 | |
[![Build Status](https://travis-ci.org/satta/ifplugo.svg?branch=master)](https://travis-ci.org/satta/ifplugo)
|
|
3 |
[![CircleCI](https://circleci.com/gh/satta/ifplugo.svg?style=shield)](https://circleci.com/gh/satta/ifplugo)
|
4 | 4 |
|
5 | 5 |
ifplugo delivers network interface link information and link changes. It does this (on Linux) by using code from [ifplugd](http://0pointer.de/lennart/projects/ifplugd/) to gather the necessary status information, then emits a status summary on a given channel. This summary (`LinkStatusSample`) is emitted on the first invocation and each time the state changes for at least one monitored interface.
|
6 | 6 |
|