-
-
Notifications
You must be signed in to change notification settings - Fork 621
63 lines (59 loc) · 1.48 KB
/
clustertool.tests.yaml
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: clustertool-go-tests
on:
workflow_dispatch:
workflow_call:
push:
branches:
- main
tags:
- "*"
paths:
- 'main.go'
- 'go.mod'
- 'go.sum'
- 'pkg/**'
- 'cmd/**'
- 'clustertool/**'
- ".github/workflows/clustertool.test.yaml"
#pull_request:
# branches:
# - main
# paths:
# - 'main.go'
# - 'go.mod'
# - 'go.sum'
# - 'pkg/**'
# - 'cmd/**'
# - 'clustertool/**'
# - ".github/workflows/clsutertool.test.yaml"
permissions:
contents: read
jobs:
check_changes:
runs-on: ubuntu-latest
outputs:
changes_detected: ${{ steps.filter.outputs.changed }}
steps:
- name: Checkout code
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
- name: Filter paths
id: filter
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
with:
list-files: json
filters: |
changed:
- 'clustertool/**'
build:
runs-on: actions-runners
if: needs.check_changes.outputs.changes_detected == 'true'
steps:
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5
with:
go-version: stable
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- run: |
cd ./clustertool
go build -o /usr/local/bin/clustertool
go test -v ./... -race -covermode=atomic
clustertool-dev