Skip to content

Commit 9005132

Browse files
authored
Add Code Coverage and Licence scan to CI (rogchap#72)
* add step to upload coverage report * Add Badges for codecov and FOSSA * Add FOSSA to CI
1 parent eddbe9a commit 9005132

File tree

4 files changed

+41
-4
lines changed

4 files changed

+41
-4
lines changed

.fossa.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Visit https://fossa.com to learn more
2+
3+
version: 2
4+
cli:
5+
server: https://app.fossa.com
6+
fetcher: custom
7+
project: [email protected]:rogchap/v8go.git
8+
analyze:
9+
modules:
10+
- name: v8go
11+
type: go
12+
target: rogchap.com/v8go
13+
path: .

.github/workflows/test.yml

+20-4
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,32 @@ jobs:
1212
name: Tests on ${{ matrix.go-version }} ${{ matrix.platform }}
1313
strategy:
1414
matrix:
15-
go-version: [1.12.17, 1.15.6]
15+
go-version: [1.12.17, 1.15.7]
1616
platform: [ubuntu-latest, macos-latest]
1717
runs-on: ${{ matrix.platform }}
1818

1919
steps:
2020
- name: Install Go
21-
uses: actions/setup-go@v1
21+
uses: actions/setup-go@v2
2222
with:
2323
go-version: ${{ matrix.go-version }}
2424
- name: Checkout
25-
uses: actions/checkout@v1
25+
uses: actions/checkout@v2
2626
- name: Go Test
27-
run: go test -v -cover ./...
27+
run: go test -v -coverprofile c.out ./...
28+
- name: Upload coverage to Codecov
29+
uses: codecov/codecov-action@v1
30+
env:
31+
OS: ${{ matrix.platform }}
32+
GO: ${{ matrix.go-version }}
33+
with:
34+
files: ./c.out
35+
env_vars: OS,GO
36+
- name: Add GOPATH to GITHUB_ENV
37+
run: echo "GOPATH=$(go env GOPATH)" >>"$GITHUB_ENV"
38+
- name: Scan and upload FOSSA data
39+
run: |
40+
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | sudo bash
41+
fossa analyze
42+
env:
43+
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66
.gclient_entries
77

88
deps/darwin-x86_64/libv8_debug.a
9+
10+
c.out

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
[![Go Reference](https://pkg.go.dev/badge/rogchap.com/v8go.svg)](https://pkg.go.dev/rogchap.com/v8go)
66
[![CI](https://github.com/rogchap/v8go/workflows/CI/badge.svg)](https://github.com/rogchap/v8go/actions?query=workflow%3ACI)
77
![V8 Build](https://github.com/rogchap/v8go/workflows/V8%20Build/badge.svg)
8+
[![codecov](https://codecov.io/gh/rogchap/v8go/branch/master/graph/badge.svg?token=VHZwzGm3dV)](https://codecov.io/gh/rogchap/v8go)
9+
[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B22862%2Fgit%40github.com%3Arogchap%2Fv8go.git.svg?type=shield)](https://app.fossa.com/projects/custom%2B22862%2Fgit%40github.com%3Arogchap%2Fv8go.git?ref=badge_shield)
810
[![#v8go Slack Channel](https://img.shields.io/badge/slack-%23v8go-4A154B?logo=slack)](https://gophers.slack.com/channels/v8go)
911

1012
<img src="gopher.jpg" width="200px" alt="V8 Gopher based on original artwork from the amazing Renee French" />
@@ -124,6 +126,10 @@ exception.
124126

125127
This project also aims to keep up-to-date with the latest (stable) release of V8.
126128

129+
## License
130+
131+
[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B22862%2Fgit%40github.com%3Arogchap%2Fv8go.git.svg?type=large)](https://app.fossa.com/projects/custom%2B22862%2Fgit%40github.com%3Arogchap%2Fv8go.git?ref=badge_large)
132+
127133
## Development
128134

129135
### Upgrading the V8 binaries

0 commit comments

Comments
 (0)