forked from openshift-kni/eco-goinfra
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (32 loc) · 893 Bytes
/
makefile.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: Test Incoming Changes
on:
workflow_dispatch:
push:
pull_request:
branches:
- main
- 'release-\d.\d\d'
jobs:
build:
runs-on: ubuntu-22.04
env:
SHELL: /bin/bash
steps:
- name: Set up Go 1.20
uses: actions/setup-go@v3
with:
go-version: 1.20.11
- uses: actions/checkout@v3
- name: Run lint
run: make lint
- name: Run unit tests
run: make test
- name: Generate test coverage
run: go test ./pkg/... -coverprofile=./cover.out -covermode=atomic -coverpkg=./...
- name: Check test coverage
uses: vladopajic/go-test-coverage@v2
with:
# Configure action using config file (option 1)
config: ./.testcoverage.yml
git-token: ${{ github.ref_name == 'main' && secrets.GITHUB_TOKEN || '' }}
git-branch: badges