Skip to content

Commit 338d88c

Browse files
committed
Separate main CI tests and CRD2Go CI
1 parent 64233d8 commit 338d88c

File tree

4 files changed

+82
-5
lines changed

4 files changed

+82
-5
lines changed
Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
# This workflow will build a golang project
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
3-
4-
name: Go
1+
# CRD2Go CI
2+
name: CRD2Go CI
53

64
on:
75
push:
86
branches: [ "main" ]
7+
paths:
8+
- 'tools/crd2go/**'
99
pull_request:
1010
branches: [ "main" ]
11+
paths:
12+
- 'tools/crd2go/**'
1113

1214
jobs:
1315

@@ -46,3 +48,24 @@ jobs:
4648
run: |
4749
echo "Did you run gofmt-gci?"
4850
devbox run -- 'gofmt-gci && git diff-index --name-only HEAD && git diff-index --quiet HEAD --'
51+
52+
licenses:
53+
runs-on: ubuntu-latest
54+
steps:
55+
- uses: actions/checkout@v5
56+
57+
- name: Install devbox
58+
uses: jetify-com/devbox-install-action@v0.13.0
59+
with:
60+
enable-cache: 'true'
61+
62+
- name: Check license headers
63+
run: |
64+
$(go env GOPATH)/bin/addlicense \
65+
-check \
66+
-l apache \
67+
-c "MongoDB Inc" \
68+
-ignore "**/*.md" \
69+
-ignore "**/*.yaml" \
70+
-ignore "**/*.yml" \
71+
-ignore "**/*.nix" .

.github/workflows/test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ on:
88
- 'main'
99
paths-ignore:
1010
- 'docs/**'
11+
- 'tools/**'
1112
pull_request_target:
1213
types: [opened, synchronize, reopened, ready_for_review, converted_to_draft, labeled]
1314
branches:
1415
- '**'
1516
paths-ignore:
1617
- 'docs/**'
18+
- 'tools/**'
1719
merge_group:
1820
workflow_dispatch:
1921
inputs:
@@ -25,6 +27,9 @@ on:
2527
options:
2628
- "true"
2729
- "false"
30+
paths-ignore:
31+
- 'docs/**'
32+
- 'tools/**'
2833

2934
jobs:
3035
run-tests:

tools/crd2go/devbox.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"kubernetes-controller-tools@latest",
88
"gh@latest",
99
"gci@latest",
10-
"golangci-lint@latest"
10+
"golangci-lint@latest",
11+
"addlicense@latest"
1112
],
1213
"shell": {
1314
"init_hook": [

tools/crd2go/devbox.lock

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,54 @@
11
{
22
"lockfile_version": "1",
33
"packages": {
4+
"addlicense@latest": {
5+
"last_modified": "2025-07-28T17:09:23Z",
6+
"resolved": "github:NixOS/nixpkgs/648f70160c03151bc2121d179291337ad6bc564b#addlicense",
7+
"source": "devbox-search",
8+
"version": "1.1.1",
9+
"systems": {
10+
"aarch64-darwin": {
11+
"outputs": [
12+
{
13+
"name": "out",
14+
"path": "/nix/store/r3lhc2n8xj5ns43zrfdx1d4rsk6l0zgy-addlicense-1.1.1",
15+
"default": true
16+
}
17+
],
18+
"store_path": "/nix/store/r3lhc2n8xj5ns43zrfdx1d4rsk6l0zgy-addlicense-1.1.1"
19+
},
20+
"aarch64-linux": {
21+
"outputs": [
22+
{
23+
"name": "out",
24+
"path": "/nix/store/smjx8fp2r6ikxr6fv6vd9nws8j546hs3-addlicense-1.1.1",
25+
"default": true
26+
}
27+
],
28+
"store_path": "/nix/store/smjx8fp2r6ikxr6fv6vd9nws8j546hs3-addlicense-1.1.1"
29+
},
30+
"x86_64-darwin": {
31+
"outputs": [
32+
{
33+
"name": "out",
34+
"path": "/nix/store/gpfw7kfm0rm4gcpnz2cgkb3d4zxyn32s-addlicense-1.1.1",
35+
"default": true
36+
}
37+
],
38+
"store_path": "/nix/store/gpfw7kfm0rm4gcpnz2cgkb3d4zxyn32s-addlicense-1.1.1"
39+
},
40+
"x86_64-linux": {
41+
"outputs": [
42+
{
43+
"name": "out",
44+
"path": "/nix/store/mxb6kb1b7lfklzmz020m0rdf7ppn0608-addlicense-1.1.1",
45+
"default": true
46+
}
47+
],
48+
"store_path": "/nix/store/mxb6kb1b7lfklzmz020m0rdf7ppn0608-addlicense-1.1.1"
49+
}
50+
}
51+
},
452
"gci@latest": {
553
"last_modified": "2025-08-05T11:35:34Z",
654
"resolved": "github:NixOS/nixpkgs/a683adc19ff5228af548c6539dbc3440509bfed3#gci",

0 commit comments

Comments
 (0)