From f94b4f8ae3eca4bbd2ff198df8e7b61d0b653fbd Mon Sep 17 00:00:00 2001 From: Andrew Neudegg Date: Sat, 26 Dec 2020 17:09:38 +0000 Subject: [PATCH] feat: added generic http sink server. Signed-off-by: Andrew Neudegg --- .github/dependabot.yml | 14 +++++++++++ .github/workflows/build.yml | 32 ++++++++++++++++++++++++ .github/workflows/coverage.yml | 34 ++++++++++++++++++++++++++ .github/workflows/greeter.yml | 13 ++++++++++ .github/workflows/license-scanning.yml | 18 ++++++++++++++ .github/workflows/stale.yml | 19 ++++++++++++++ go.mod | 1 + go.sum | 3 +++ 8 files changed, 134 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/coverage.yml create mode 100644 .github/workflows/greeter.yml create mode 100644 .github/workflows/license-scanning.yml create mode 100644 .github/workflows/stale.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..68d4f1e --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +version: 2 +updates: + + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + + # Maintain dependencies for golang + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "daily" \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..994ea5a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,32 @@ +name: Go-build-status + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + name: Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ^1.15 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Get dependencies + run: go get -v -t -d ./... + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... \ No newline at end of file diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..25ebcde --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,34 @@ +name: quality + +on: + push: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: ^1.15 + + - name: Install dependencies + run: | + go version + go get -u golang.org/x/lint/golint + + - name: Build + run: go build ./... + + - name: Test With Coverage + run: go test -gcflags=-l -v -coverprofile=coverage.txt -covermode=atomic ./... + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + + - name: Run Vet & Lint + run: | + go vet ./... + golint -set_exit_status=1 ./... diff --git a/.github/workflows/greeter.yml b/.github/workflows/greeter.yml new file mode 100644 index 0000000..3cb5716 --- /dev/null +++ b/.github/workflows/greeter.yml @@ -0,0 +1,13 @@ +name: Greetings + +on: [pull_request, issues] + +jobs: + greeting: + runs-on: ubuntu-latest + steps: + - uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: 'Thank you for your issue, someone will take a look asap!' + pr-message: 'Thank you for your PR, someone will take a look asap!' \ No newline at end of file diff --git a/.github/workflows/license-scanning.yml b/.github/workflows/license-scanning.yml new file mode 100644 index 0000000..e97163d --- /dev/null +++ b/.github/workflows/license-scanning.yml @@ -0,0 +1,18 @@ +name: License Scanning + +on: + - pull_request + - push + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Run FOSSA scan and upload build data + uses: fossa-contrib/fossa-action@v1 + with: + fossa-api-key: ${{ secrets.FOSSA_API_KEY }} \ No newline at end of file diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..c09af0e --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,19 @@ +name: Mark stale issues and pull requests + +on: + schedule: + - cron: "30 1 * * *" + +jobs: + stale: + + runs-on: ubuntu-latest + + steps: + - uses: actions/stale@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'This issue has become stale.' + stale-pr-message: 'This pull request has become stale.' + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity' \ No newline at end of file diff --git a/go.mod b/go.mod index 5abf453..78c191c 100644 --- a/go.mod +++ b/go.mod @@ -5,4 +5,5 @@ go 1.15 require ( github.com/google/uuid v1.1.2 github.com/sirupsen/logrus v1.7.0 + github.com/stretchr/testify v1.2.2 ) diff --git a/go.sum b/go.sum index b45f6c5..f4cc692 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,12 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=