forked from eclipse-iofog/iofogctl
-
Notifications
You must be signed in to change notification settings - Fork 0
152 lines (140 loc) · 4.69 KB
/
Copy pathci.yml
File metadata and controls
152 lines (140 loc) · 4.69 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: CLI CI
on:
push:
branches: [develop, release*]
tags: ['v*']
paths-ignore:
- README.md
- CHANGELOG.md
- LICENSE
pull_request:
branches: [develop, release*]
paths-ignore:
- README.md
- CHANGELOG.md
- LICENSE
workflow_dispatch:
permissions: read-all
env:
GO_VERSION: '1.26.4'
jobs:
grep-gates:
name: Grep gates
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Forbidden flavor strings
run: make grep-gates
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: go.sum
- run: go version
- name: golangci-lint
uses: golangci/golangci-lint-action@db582008a42febd596419635a5abc9d9815daa9c # v9.2.1
with:
version: v2.12.2
args: --timeout=5m0s --build-tags=containers_image_openpgp,exclude_graphdriver_btrfs
security:
name: Security
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: go.sum
- name: gosec
run: make security-code
- name: govulncheck
run: make vulncheck
unit-iofog:
name: Unit (iofog)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: go.sum
- name: Unit tests
run: make FLAVOR=iofog test-unit
unit-datasance:
name: Unit (datasance)
if: github.repository == 'Datasance/potctl'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: go.sum
- name: Unit tests
run: make FLAVOR=datasance test-unit
smoke-iofog:
name: Smoke (iofogctl)
needs: [lint, grep-gates, unit-iofog]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: go.sum
- name: Smoke
run: make FLAVOR=iofog smoke
smoke-datasance:
name: Smoke (potctl)
if: github.repository == 'Datasance/potctl'
needs: [lint, grep-gates, unit-datasance]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: go.sum
- name: Smoke
run: make FLAVOR=datasance BINARY_NAME=potctl PACKAGE_DIR=cmd/potctl smoke
build-iofogctl:
name: Build iofogctl
needs: [smoke-iofog]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: go.sum
- name: Verify embed assets
run: test -f assets/embed.go
- name: Build
run: make iofogctl
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: iofogctl-linux-amd64
path: bin/iofogctl
build-potctl:
name: Build potctl
if: github.repository == 'Datasance/potctl'
needs: [smoke-datasance]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: go.sum
- name: Verify embed assets
run: test -f assets/embed.go
- name: Build
run: make potctl
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: potctl-linux-amd64
path: bin/potctl