Skip to content

Commit

Permalink
Add coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ohsawa0515 committed May 3, 2021
1 parent 17ea120 commit cbd9606
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 22 deletions.
51 changes: 31 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
on: [pull_request]
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.15.x, 1.16.x]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Test
run: |
go test ./... -v
go test -race ./... -v
on: [pull_request]
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.15.x, 1.16.x]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Test
run: |
go test ./... -v
go test -race ./... -v
- name: Calc coverage
run: go test -v -covermode=count -coverprofile=coverage.out
- name: Convert coverage to lcov
uses: jandelgado/gcov2lcov-action@v1.0.5
if: "matrix.os == 'ubuntu-latest'" && "matrix.go-version == '1.16.x'"
- name: Coveralls
uses: coverallsapp/github-action@v1.0.4
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov
if: "matrix.os == 'ubuntu-latest'" && "matrix.go-version == '1.16.x'"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
.idea
*.iml

coverage.out
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![Build Status](https://travis-ci.org/ohsawa0515/aws-sdk-go-test.svg?branch=master)](https://travis-ci.org/ohsawa0515/aws-sdk-go-test) [![Coverage Status](https://coveralls.io/repos/github/ohsawa0515/aws-sdk-go-test/badge.svg?branch=master)](https://coveralls.io/github/ohsawa0515/aws-sdk-go-test?branch=master)

aws-sdk-go-test
===

![Test Status]((https://github.com/ohsawa0515/aws-sdk-go-test/actions/workflows/test.yml/badge.svg)) [![Coverage Status](https://coveralls.io/repos/github/ohsawa0515/aws-sdk-go-test/badge.svg?branch=master)](https://coveralls.io/github/ohsawa0515/aws-sdk-go-test?branch=master)

Test tips collection of using the aws-sdk-go.

0 comments on commit cbd9606

Please sign in to comment.