Skip to content

Commit 75b2635

Browse files
authored
Merge pull request #32 from benmatselby/switch-build
Move builds and coverage to GitHub actions and Sonar
2 parents dc67e9b + 2b225c3 commit 75b2635

File tree

5 files changed

+60
-21
lines changed

5 files changed

+60
-21
lines changed

.github/workflows/go.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Go
2+
on: [push]
3+
jobs:
4+
build:
5+
name: Build
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Set up Go 1.12
9+
uses: actions/setup-go@v1
10+
with:
11+
go-version: 1.12
12+
id: go
13+
14+
- name: Check out code into the Go module directory
15+
uses: actions/checkout@v1
16+
17+
- name: Get dependencies
18+
run: |
19+
make install
20+
21+
- name: Vet
22+
run: |
23+
make vet
24+
25+
- name: Build
26+
run: |
27+
make build
28+
29+
- name: Test
30+
run: |
31+
make test
32+
33+
- name: SonarCloud Scan
34+
uses: sonarsource/sonarcloud-github-action@master
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
coverage.out
22
debug.test
33
vendor/
4+
5+
# Sonar
6+
.scannerwork/

.travis.yml

-13
This file was deleted.

README.md

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# go-azuredevops
22

33
[![GoDoc](https://godoc.org/github.com/benmatselby/go-azuredevops/azuredevops?status.svg)](https://godoc.org/github.com/benmatselby/go-azuredevops/azuredevops)
4-
[![Build Status](https://travis-ci.org/benmatselby/go-azuredevops.png?branch=master)](https://travis-ci.org/benmatselby/go-azuredevops)
5-
[![codecov](https://codecov.io/gh/benmatselby/go-azuredevops/branch/master/graph/badge.svg)](https://codecov.io/gh/benmatselby/go-azuredevops)
4+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=go-azuredevops&metric=alert_status)](https://sonarcloud.io/dashboard?id=go-azuredevops)
65
[![Go Report Card](https://goreportcard.com/badge/github.com/benmatselby/go-azuredevops?style=flat-square)](https://goreportcard.com/report/github.com/benmatselby/go-azuredevops)
76

87
`go-azuredevops` is a Go client library for accessing the [Azure DevOps API](https://docs.microsoft.com/en-gb/rest/api/vsts/). This is very much work in progress, so at the moment supports a small subset of the API.
@@ -11,12 +10,12 @@
1110

1211
There is partial implementation for the following services
1312

14-
* Boards
15-
* Builds
16-
* Favourites
17-
* Iterations
18-
* Pull Requests
19-
* Work Items
13+
- Boards
14+
- Builds
15+
- Favourites
16+
- Iterations
17+
- Pull Requests
18+
- Work Items
2019

2120
## Usage
2221

sonar-project.properties

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
sonar.host.url=https://sonarcloud.io
2+
sonar.organization=benmatselby
3+
sonar.projectKey=go-azuredevops
4+
sonar.projectName=go-azuredevops
5+
6+
sonar.sources=.
7+
sonar.exclusions=**/*_test.go
8+
9+
sonar.tests=.
10+
sonar.test.inclusions=**/*_test.go
11+
12+
sonar.go.tests.reportPaths=coverage.out
13+
sonar.go.coverage.reportPaths=coverage.out

0 commit comments

Comments
 (0)