-
Notifications
You must be signed in to change notification settings - Fork 43
53 lines (46 loc) · 1.33 KB
/
code-coverage.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
name: omise-go code-coverage
on:
push:
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
env:
# GOPATH: ${{ github.workspace }}
WORKDIR: src/github.com/${{ github.repository }}
strategy:
matrix:
go: [ '1.21', '1.20', '1.19', '1.18', '1.17' ]
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 0
path: ${{ env.WORKDIR }}
- name: Debug
run: |
pwd
echo ${HOME}
echo ${GITHUB_WORKSPACE}
echo ${GOPATH}
echo ${GOROOT}
echo ${github.workspace}
echo src/github.com/${github.repository}
- name: Build
working-directory: ${{ env.WORKDIR }}
run: .github/scripts/setup.sh
- name: Generate coverage
working-directory: ${{ env.WORKDIR }}
env:
OMISE_PKEY: pkey_test_xxx
OMISE_SKEY: skey_test_xxx
run: .github/scripts/code-coverage.sh
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}