Skip to content

Commit

Permalink
Merge branch 'master' into #130
Browse files Browse the repository at this point in the history
  • Loading branch information
owulveryck authored Sep 22, 2019
2 parents 7d3c040 + a7a4837 commit af79319
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 17 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/codeconv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Codeconv

on:
push:
branches:
- master

jobs:
test-latest:
runs-on: ubuntu-latest
name: Create and upload coverage
steps:
- name: Check out code
uses: actions/checkout@v1
- name: Setup go
uses: actions/setup-go@v1
with:
go-version: '1.13'
- name: Get dependencies
run: go get -t ./...
- name: Run Unit tests.
run: |
echo "" > coverage.txt
for d in $(go list ./... | grep -v vendor); do
go test -race -coverprofile=profile.out -covermode=atomic "$d"
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
fi
done
- name: Upload Coverage report to CodeCov
uses: codecov/codecov-action@v1.0.0
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage.txt
40 changes: 23 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
name: CI

on: [pull_request]
on:
push:
branches:
- master
pull_request:


jobs:
test:
test-latest:
runs-on: ubuntu-latest
name: Go latest tests
steps:
- name: Check out code
uses: actions/checkout@v1
- name: Setup go
uses: actions/setup-go@v1
with:
go-version: '1.13'
- name: Get dependencies
run: go get -t ./...
- name: Run Unit tests.
run: go test ./...
test-matrix:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.13' ]
go: [ '1.11','1.12','1.13' ]
name: Go ${{ matrix.go }} tests
steps:
- name: Check out code
Expand All @@ -21,17 +40,4 @@ jobs:
- name: Get dependencies
run: go get -t ./...
- name: Run Unit tests.
run: |
echo "" > coverage.txt
for d in $(go list ./... | grep -v vendor); do
go test -race -coverprofile=profile.out -covermode=atomic "$d"
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
fi
done
- name: Upload Coverage report to CodeCov
uses: codecov/codecov-action@v1.0.0
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage.txt
run: go test ./...

0 comments on commit af79319

Please sign in to comment.