diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..5ae6ece --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,19 @@ + +name: Test and coverage + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 2 + - uses: actions/setup-go@v2 + with: + go-version: '1.16' + - name: Run coverage + run: go test -race -coverprofile=coverage.txt -covermode=atomic + - name: Upload coverage to Codecov + run: bash <(curl -s https://codecov.io/bash) diff --git a/.gitignore b/.gitignore index dfd1914..c3c8564 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ cmd/echor/echor # Test binary, build with `go test -c` *.test +coverage.txt # Output of the go coverage tool, specifically when used with LiteIDE *.out