File tree Expand file tree Collapse file tree 6 files changed +42
-81
lines changed Expand file tree Collapse file tree 6 files changed +42
-81
lines changed Original file line number Diff line number Diff line change @@ -27,29 +27,6 @@ executors:
27
27
resource_class : windows.medium
28
28
29
29
workflows :
30
- main-wf :
31
- jobs :
32
- - test
33
- - gor/release :
34
- version : " 2.1.0"
35
- go-version : " 1.22.6"
36
- dry-run : true
37
- post-steps :
38
- - persist_to_workspace :
39
- root : " ."
40
- paths :
41
- - " dist"
42
- - test-with-images :
43
- requires :
44
- - gor/release
45
- matrix :
46
- parameters :
47
- image :
48
- - linux-docker
49
- - linux-amd64
50
- - linux-arm64
51
- - macos
52
- # - windows
53
30
release-wf :
54
31
jobs :
55
32
- test :
@@ -86,59 +63,6 @@ workflows:
86
63
context : k8s-ctx
87
64
88
65
jobs :
89
- test :
90
- docker :
91
- - image : cimg/go:1.22.6
92
- environment :
93
- GOTESTSUM_JUNITFILE : " junit/unit-tests.xml"
94
- steps :
95
- - checkout
96
- - restore_cache :
97
- keys :
98
- - go-mod-v1-{{ checksum "go.sum" }}
99
- - run :
100
- name : " Download Dependancies"
101
- command : cd arc && go mod download
102
- - run :
103
- name : " Run Tests & Coverage"
104
- command : |
105
- cd ./arc
106
- mkdir junit
107
- gotestsum -- -coverprofile=coverage.txt -covermode=atomic ./...
108
- bash <(curl -s https://codecov.io/bash)
109
- - store_test_results :
110
- path : junit
111
- - store_artifacts :
112
- path : junit/unit-tests.xml
113
- - run :
114
- name : " Upload to Codecov"
115
- command : cd arc && bash <(curl -s https://codecov.io/bash)
116
- - save_cache :
117
- key : go-mod-v1-{{ checksum "go.sum" }}
118
- paths :
119
- - " /home/circleci/.cache/go-build"
120
- test-with-images :
121
- parameters :
122
- image :
123
- type : executor
124
- executor : <<parameters.image>>
125
- steps :
126
- - osd/init
127
- - attach_workspace :
128
- at : .
129
- - run : |
130
- V1=""
131
-
132
- if uname -m | grep "x86_64"; then
133
- V1="_v1"
134
- fi
135
-
136
- if [ $OSD_FAMILY == "linux" ]; then
137
-
138
- ./dist/arc_linux_$(dpkg --print-architecture)${V1}/arc version
139
- else
140
- ./dist/arc_darwin_arm64/arc version
141
- fi
142
66
deb-publish :
143
67
executor : linux-amd64
144
68
steps :
Original file line number Diff line number Diff line change
1
+ name : " Main WF"
2
+
3
+ on : push
4
+
5
+ jobs :
6
+ unit-tests :
7
+ runs-on : ubuntu-22.04
8
+ env :
9
+ TEST_RESULTS : /tmp/test-results
10
+ GOTESTSUM_JUNITFILE : " junit/unit-tests.xml"
11
+ steps :
12
+ - uses : actions/checkout@v4
13
+ - uses : actions/setup-go@v5
14
+ with :
15
+ go-version-file : ' ./go.mod'
16
+ - name : " Install Deps"
17
+ run : |
18
+ curl -sSL "https://github.com/magefile/mage/releases/download/v1.15.0/mage_1.15.0_Linux-64bit.tar.gz" | sudo tar -xz --no-same-owner -C /usr/local/bin mage
19
+ mage --version
20
+ go install github.com/jackc/tern/v2@latest
21
+ tern version
22
+ go install gotest.tools/gotestsum@latest
23
+ gotestsum --version
24
+ - run : cd arc && mage -v test
25
+ build-dry-run :
26
+ runs-on : ubuntu-22.04
27
+ steps :
28
+ - uses : actions/checkout@v4
29
+ - uses : goreleaser/goreleaser-action@v6
30
+ with :
31
+ version : ' 2.2.0'
32
+ args : " release --snapshot"
Original file line number Diff line number Diff line change @@ -30,9 +30,9 @@ archives:
30
30
name_template : >-
31
31
{{ .ProjectName }}-v{{ .Version }}-{{ if eq .Os "darwin" }}macos{{ else }}{{ .Os }}{{ end }}-{{ .Arch }}{{ if .Arm }}hf{{ end }}
32
32
files :
33
- - LICENSE
34
- - README.md
35
- - completions/*
33
+ - ./ LICENSE
34
+ - ./ README.md
35
+ - ./ completions/*
36
36
37
37
nfpms :
38
38
- package_name : hubci-arc
Original file line number Diff line number Diff line change @@ -41,7 +41,12 @@ func TestClonePass(t *testing.T) {
41
41
rootCmd .Execute ()
42
42
43
43
// check to see if repo was cloned
44
- if _ , err := os .Stat ("/home/circleci/Repos/hubci/arc/.git" ); os .IsNotExist (err ) {
44
+ homeDir , err := os .UserHomeDir ()
45
+ if err != nil {
46
+ t .Error ("Failed to read user's home directory." )
47
+ }
48
+
49
+ if _ , err := os .Stat (homeDir + "/Repos/hubci/arc/.git" ); os .IsNotExist (err ) {
45
50
t .Error ("`arc clone` failed to clone the arc repository." )
46
51
}
47
52
}
File renamed without changes.
Original file line number Diff line number Diff line change @@ -6,5 +6,5 @@ rm -rf ./completions
6
6
mkdir ./completions
7
7
8
8
for sh in bash fish zsh; do
9
- go run ./arc/main.go completion " $sh " > " completions/arc.$sh "
9
+ go run ./arc/. completion " $sh " > " completions/arc.$sh "
10
10
done
You can’t perform that action at this time.
0 commit comments