-
Notifications
You must be signed in to change notification settings - Fork 51
42 lines (36 loc) · 1.09 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
39
40
41
42
name: Go Test
# Trigger the workflow on push or pull request
on:
push:
branches:
- 'master'
tags:
- '*'
pull_request:
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.20.1
uses: actions/setup-go@v3
with:
go-version: 1.20.1
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Hack Code Climate and Go Modules
if: github.event_name != 'pull_request'
run: mkdir -p github.com/mittwald && ln -sf $(pwd) github.com/mittwald/goharbor-client
- name: Test & publish code coverage
if: github.event_name != 'pull_request'
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.codeClimateReporterID }}
with:
coverageCommand: go test -coverprofile=c.out ./...
debug: true
prefix: 'github.com/${{ github.repository }}/v5'
- name: Go Test
if: github.event_name == 'pull_request'
run: go test -coverprofile=c.out ./...