diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..57fb7a5 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,24 @@ +name: Check + +on: [push, pull_request] + +jobs: + check: + name: Check + runs-on: ubuntu-latest + steps: + + - name: Setup Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ^1.13 + id: go + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Get dependencies + run: go mod download + + - name: Running tests + 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..ed2fafa --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,33 @@ +name: Coverage + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + coverage: + name: Coverage + runs-on: ubuntu-latest + steps: + + - name: Setup Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ^1.13 + id: go + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Get dependencies + run: go mod download + + - name: Running tests + run: go test -cover -coverprofile=coverage.out ./... + + - name: Reporting coverage + env: + CODECOV_TOKEN: d864d00b-a566-423e-bd8b-79ed7bbfe025 + run: bash <(curl -s https://codecov.io/bash) \ No newline at end of file