-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (32 loc) · 1.1 KB
/
codeclimate.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
name: Code Climate
on:
push:
branches:
- main
jobs:
codeclimate:
runs-on: ubuntu-latest
steps:
- name: Check Out Code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21 # Replace with your Go version
- name: Print Current Working Directory
run: |
ls -all
working-directory: ${{ github.workspace }}
- name: Install Code Climate Test Reporter
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
- name: Run Tests and Upload Coverage
env:
CC_TEST_REPORTER_ID: 4409f8e483a77d5f19fc0ccb0e31b4b0829d054f325e81eaf98cd2f4115f490e
run: |
go test ./... -coverprofile c.out
mkdir -p ./github.com/careyjames
ln -s $PWD ./github.com/careyjames/dns-scout
./cc-test-reporter format-coverage -t gocov -o codeclimate.json c.out
./cc-test-reporter upload-coverage -i ./codeclimate.json