Skip to content

Commit

Permalink
Merge pull request #13 from mrobinsn/ci-update
Browse files Browse the repository at this point in the history
Switch from travis-ci to circle-ci
  • Loading branch information
Michael Robinson authored Jun 29, 2021
2 parents cd89d9c + 9c670cb commit 506d57a
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 11 deletions.
50 changes: 50 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
version: 2
jobs:
build:
docker:
- image: circleci/golang:1.16

working_directory: /go/src/github.com/mrobinsn/go-newznab

environment:
TEST_RESULTS: /tmp/test-results

steps:
- checkout
- run:
name: Install App
command: |
go install ./...
- run:
name: Lint
command: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.41.1
golangci-lint run -v
- run:
name: Install Test Dependencies
command: |
(cd; GO111MODULE=on go get github.com/jstemmer/go-junit-report)
(cd; GO111MODULE=on go get github.com/go-playground/overalls)
- run:
name: Run unit tests
command: |
mkdir -p $TEST_RESULTS
trap "go-junit-report < \"${TEST_RESULTS}/go-test.out\" > \"${TEST_RESULTS}/go-test-report.xml\"" EXIT
go test -v -race ./... 2>&1 | tee "${TEST_RESULTS}/go-test.out"
- run:
name: Calculate Coverage
command: |
overalls -project /go/src/github.com/mrobinsn/go-newznab
mv overalls.coverprofile coverage.txt
bash <(curl -s https://codecov.io/bash)
- store_artifacts:
path: /tmp/test-results
destination: raw-test-output
- store_test_results:
path: /tmp/test-results

workflows:
version: 2
build_and_test:
jobs:
- build
8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
[![GoDoc](https://godoc.org/github.com/mrobinsn/go-newznab/newznab?status.svg)](https://godoc.org/github.com/mrobinsn/go-newznab/newznab)
[![Go Report Card](https://goreportcard.com/badge/github.com/mrobinsn/go-newznab)](https://goreportcard.com/report/github.com/mrobinsn/go-newznab)
[![Build Status](https://travis-ci.org/mrobinsn/go-newznab.svg?branch=master)](https://travis-ci.org/mrobinsn/go-newznab)
[![Coverage Status](https://coveralls.io/repos/github/mrobinsn/go-newznab/badge.svg?branch=master)](https://coveralls.io/github/mrobinsn/go-newznab?branch=master)
[![CircleCI](https://circleci.com/gh/mrobinsn/go-newznab.svg?style=svg)](https://circleci.com/gh/mrobinsn/go-newznab)
[![codecov](https://codecov.io/gh/mrobinsn/go-newznab/branch/master/graph/badge.svg?token=MB1QbbEiAT)](https://codecov.io/gh/mrobinsn/go-newznab)
[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)


Expand Down
4 changes: 2 additions & 2 deletions newznab/newznab_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ func TestUsenetCrawlerClient(t *testing.T) {

if err != nil {
w.WriteHeader(http.StatusNotFound)
w.Write([]byte("File not found"))
w.Write([]byte("File not found")) // nolint:errcheck
} else {
w.Write(f)
w.Write(f) // nolint:errcheck
}
}))

Expand Down

0 comments on commit 506d57a

Please sign in to comment.