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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.go text eol=lf
25 changes: 25 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: lint
on:
push:
tags:
- v*
branches:
- master
pull_request:
jobs:
golangci:
strategy:
matrix:
go-version: [1.15.x]
os: [ubuntu-latest]
name: lint
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: latest
- name: testing
run: go test ./...
21 changes: 21 additions & 0 deletions .github/workflows/vulns.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: vulns
on:
push:
tags:
- v*
branches:
- master
pull_request:
jobs:
vulns:
name: Vulnerability scanner
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ^1.13
- name: WriteGoList
run: go list -json -m all > go.list
- name: Nancy
uses: sonatype-nexus-community/nancy-github-action@main
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# openbd-api -- APIs for openBD by Golang

[![Build Status](https://travis-ci.org/spiegel-im-spiegel/openbd-api.svg?branch=master)](https://travis-ci.org/spiegel-im-spiegel/openbd-api)
[![check vulns](https://github.com/spiegel-im-spiegel/openbd-api/workflows/vulns/badge.svg)](https://github.com/spiegel-im-spiegel/openbd-api/actions)
[![lint status](https://github.com/spiegel-im-spiegel/openbd-api/workflows/lint/badge.svg)](https://github.com/spiegel-im-spiegel/openbd-api/actions)
[![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/spiegel-im-spiegel/openbd-api/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/spiegel-im-spiegel/openbd-api.svg)](https://github.com/spiegel-im-spiegel/openbd-api/releases/latest)

Expand Down
4 changes: 4 additions & 0 deletions clean-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
rm ./go.sum
go clean -cache
go clean -modcache
8 changes: 5 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ module github.com/spiegel-im-spiegel/openbd-api
go 1.15

require (
github.com/spf13/cobra v1.0.0
github.com/spiegel-im-spiegel/errs v1.0.0
github.com/spiegel-im-spiegel/gocli v0.10.1
github.com/spf13/cobra v1.0.1-0.20201001152800-40d34bca1bff
github.com/spiegel-im-spiegel/errs v1.0.2
github.com/spiegel-im-spiegel/gocli v0.10.3
)

replace github.com/coreos/etcd v3.3.13+incompatible => github.com/coreos/etcd v3.3.25+incompatible
196 changes: 178 additions & 18 deletions go.sum

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions test-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
go mod verify || exit 1
go mod tidy -v || exit 1
go list -json -m all | nancy sleuth -n || exit 1
golangci-lint run ./... || exit 1
go test ./...