diff --git a/.github/workflows/go-coverage.yml b/.github/workflows/go-coverage.yml new file mode 100644 index 0000000..c38c239 --- /dev/null +++ b/.github/workflows/go-coverage.yml @@ -0,0 +1,27 @@ +name: test coverage +on: + push: + branches: + - master + pull_request: +jobs: + coverage: + runs-on: ubuntu-latest + steps: + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: '1.14' + - name: Checkout + uses: actions/checkout@v2 + - name: Calc Coverage + run: | + go test -v ./... -covermode=count -coverprofile=coverage.out + continue-on-error: true + - name: Convert coverage.out to coverage.lcov + uses: jandelgado/gcov2lcov-action@v1.0.6 + - name: Coveralls + uses: coverallsapp/github-action@v1.1.2 + with: + github-token: ${{ secrets.github_token }} + path-to-lcov: coverage.lcov diff --git a/README.md b/README.md index 29033c2..2413fb6 100755 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Coverage Status](https://coveralls.io/repos/github/uclaacm/teach-la-go-backend/badge.svg?branch=master)](https://coveralls.io/github/uclaacm/teach-la-go-backend?branch=master) + # teach-la-go-backend Hey there! This is the repo for the Go Backend for the Teach LA editor. If you're a frontend dev and are just looking for documentation of our endpoints, you can find that [right here](https://documenter.getpostman.com/view/10224331/TW6xmnn2). If you're a backend dev (or prospective dev) looking to get involved, then read on for info on how to get up and running!