-
Notifications
You must be signed in to change notification settings - Fork 5
63 lines (52 loc) · 1.75 KB
/
go.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
# add this step
- name: Set up GOPATH
run: |
echo "GOPATH=${{ github.workspace }}" >> "$GITHUB_ENV"
echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Get Requirements
run: |
sudo apt-get -y install restic
sudo apt-get install findutils
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
path: src/github.com/azak-azkaran/agent
- name: Make Coverage Reports
run: make coverage
working-directory: src/github.com/azak-azkaran/agent
- name: Update SonarProject Version
run: echo "sonar.projectVersion=`git describe --tags --abbrev=0`" >> sonar-project.properties
working-directory: src/github.com/azak-azkaran/agent
- name: SonarCloud Scan
# You may pin to the exact commit or the version.
# uses: SonarSource/sonarcloud-github-action@f4c6e4d91ea9785ec823eaeed459042606123402
uses: SonarSource/[email protected]
with:
projectBaseDir: src/github.com/azak-azkaran/agent
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Coveralls
env:
GO111MODULE: off
run: go get github.com/mattn/goveralls
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=cover.out -service="github"
working-directory: src/github.com/azak-azkaran/agent