Skip to content

Commit 44b30f4

Browse files
authored
Merge pull request #1 from edcdavid/add-ci-test-rename
Add ci test and rename organization
2 parents dd8635a + 18ddd56 commit 44b30f4

File tree

15 files changed

+233
-106
lines changed

15 files changed

+233
-106
lines changed

.checkmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[maxbodylength]
2+
disabled = true

.github/workflows/pre-main.yaml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Test Incoming Changes
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
env:
14+
TERM: xterm-color
15+
CM_BIN: /usr/local/bin/checkmake
16+
CM_URL_LINUX: https://github.com/mrtazz/checkmake/releases/download/0.2.2/checkmake-0.2.2.linux.amd64 # yamllint disable-line
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
lint-and-test:
24+
name: Run Linters, Vet and unit tests
25+
runs-on: ubuntu-22.04
26+
env:
27+
SHELL: /bin/bash
28+
29+
steps:
30+
- name: Set up Go 1.22
31+
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
32+
with:
33+
go-version: 1.22.5
34+
35+
- name: Disable default go problem matcher
36+
run: echo "::remove-matcher owner=go::"
37+
38+
- name: Check out code
39+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
40+
with:
41+
ref: ${{ github.sha }}
42+
43+
- name: Extract dependent Pull Requests
44+
uses: depends-on/depends-on-action@9e8a61fce18b15281e831f1bba0e14c71d1e1f46 # main
45+
with:
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
48+
- name: Install checkmake
49+
run: |
50+
curl --location --output $CM_BIN --silent $CM_URL_LINUX
51+
chmod +x $CM_BIN
52+
53+
- name: Install Shfmt
54+
uses: mfinelli/setup-shfmt@031e887e39d899d773a7e9b6dd6472c2c23ff50d # v3.0.1
55+
56+
- name: Golangci-lint
57+
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
58+
with:
59+
version: v1.59
60+
args: --timeout 10m0s
61+
62+
- name: Checkmake
63+
run: checkmake --config=.checkmake Makefile
64+
65+
- name: Shfmt
66+
run: shfmt -d scripts
67+
68+
- name: ShellCheck
69+
uses: ludeeus/action-shellcheck@00b27aa7cb85167568cb48a3838b75f4265f2bca # master
70+
71+
- name: Go vet
72+
run: make vet
73+
74+
- name: Run Build
75+
run: make build
76+
env:
77+
SHELL: /bin/bash
78+
79+
- name: Run Tests
80+
run: make test
81+
env:
82+
SHELL: /bin/bash

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.PHONY: all clean test build
12
lint:
23
golangci-lint run
34
# Install golangci-lint
@@ -13,4 +14,6 @@ lint-all:
1314
$(MAKE) lint -C .
1415
$(MAKE) lint -C ./pkg/lib
1516
$(MAKE) lint -C ./pkg/export
16-
$(MAKE) lint -C ./examples/basic
17+
$(MAKE) lint -C ./examples/basic
18+
test:
19+
./scripts/test.sh

examples/basic/basic.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
l2lib "github.com/redhat-best-practices-for-k8s/l2discovery/l2lib/pkg/export"
5-
"github.com/redhat-best-practices-for-k8s/simplegraphsolver/pkg/lib"
4+
l2lib "github.com/redhat-cne/l2discovery/l2lib/pkg/export"
5+
"github.com/redhat-cne/simplegraphsolver/pkg/lib"
66
)
77

88
type testGraph struct {

examples/basic/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/redhat-best-practices-for-k8s/simplegraphsolver/examples/basic
1+
module github.com/redhat-cne/simplegraphsolver/examples/basic
22

33
go 1.22.5
44

go.mod

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,31 @@
1-
module github.com/redhat-best-practices-for-k8s/l2discovery-examples
1+
module github.com/redhat-cne/l2discovery-examples
22

3-
go 1.22.5
3+
go 1.22.0
44

5-
replace k8s.io/client-go => k8s.io/client-go v0.29.7
5+
replace (
6+
k8s.io/api v0.31.0 => k8s.io/api v0.29.0
7+
k8s.io/apimachinery => k8s.io/apimachinery v0.29.0
8+
k8s.io/client-go => k8s.io/client-go v0.29.0
9+
)
610

711
require (
8-
github.com/openshift/ptp-operator v0.0.0-20240719170405-a3502a34dbd8
9-
github.com/redhat-best-practices-for-k8s/graphsolver-lib v0.0.5
10-
github.com/redhat-best-practices-for-k8s/l2discovery-lib v0.0.10
12+
github.com/openshift/ptp-operator v0.0.0-20240820132422-340fb8f46533
13+
github.com/redhat-cne/graphsolver-lib v0.0.5
14+
github.com/redhat-cne/l2discovery-lib v0.0.12
1115
)
1216

1317
require (
1418
github.com/beorn7/perks v1.0.1 // indirect
1519
github.com/cespare/xxhash/v2 v2.2.0 // indirect
16-
github.com/davecgh/go-spew v1.1.1 // indirect
20+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
1721
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
1822
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
1923
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
2024
github.com/fsnotify/fsnotify v1.6.0 // indirect
21-
github.com/go-logr/logr v1.4.1 // indirect
25+
github.com/go-logr/logr v1.4.2 // indirect
2226
github.com/go-openapi/jsonpointer v0.19.6 // indirect
2327
github.com/go-openapi/jsonreference v0.20.2 // indirect
24-
github.com/go-openapi/swag v0.22.3 // indirect
28+
github.com/go-openapi/swag v0.22.4 // indirect
2529
github.com/gogo/protobuf v1.3.2 // indirect
2630
github.com/golang/glog v1.1.0 // indirect
2731
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
@@ -47,35 +51,34 @@ require (
4751
github.com/prometheus/client_model v0.4.0 // indirect
4852
github.com/prometheus/common v0.44.0 // indirect
4953
github.com/prometheus/procfs v0.10.1 // indirect
50-
github.com/redhat-best-practices-for-k8s/graphsolver-exports v0.0.2 // indirect
51-
github.com/redhat-best-practices-for-k8s/l2discovery-exports v0.0.5 // indirect
52-
github.com/redhat-best-practices-for-k8s/privileged-daemonset v1.0.31 // indirect
54+
github.com/redhat-cne/graphsolver-exports v0.0.2 // indirect
55+
github.com/redhat-cne/l2discovery-exports v0.0.4 // indirect
56+
github.com/redhat-cne/privileged-daemonset v1.0.33 // indirect
5357
github.com/sirupsen/logrus v1.9.3 // indirect
5458
github.com/spf13/pflag v1.0.5 // indirect
5559
github.com/yourbasic/graph v0.0.0-20210606180040-8ecfec1c2869 // indirect
5660
golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 // indirect
57-
golang.org/x/net v0.23.0 // indirect
58-
golang.org/x/oauth2 v0.10.0 // indirect
59-
golang.org/x/sys v0.18.0 // indirect
60-
golang.org/x/term v0.18.0 // indirect
61-
golang.org/x/text v0.14.0 // indirect
61+
golang.org/x/net v0.26.0 // indirect
62+
golang.org/x/oauth2 v0.21.0 // indirect
63+
golang.org/x/sys v0.21.0 // indirect
64+
golang.org/x/term v0.21.0 // indirect
65+
golang.org/x/text v0.16.0 // indirect
6266
golang.org/x/time v0.3.0 // indirect
6367
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
64-
google.golang.org/appengine v1.6.7 // indirect
65-
google.golang.org/protobuf v1.33.0 // indirect
68+
google.golang.org/protobuf v1.34.2 // indirect
6669
gopkg.in/inf.v0 v0.9.1 // indirect
6770
gopkg.in/yaml.v2 v2.4.0 // indirect
6871
gopkg.in/yaml.v3 v3.0.1 // indirect
69-
k8s.io/api v0.30.3 // indirect
72+
k8s.io/api v0.31.0 // indirect
7073
k8s.io/apiextensions-apiserver v0.28.3 // indirect
71-
k8s.io/apimachinery v0.30.3 // indirect
72-
k8s.io/client-go v0.30.3 // indirect
74+
k8s.io/apimachinery v0.31.0 // indirect
75+
k8s.io/client-go v0.31.0 // indirect
7376
k8s.io/component-base v0.28.3 // indirect
74-
k8s.io/klog/v2 v2.120.1 // indirect
77+
k8s.io/klog/v2 v2.130.1 // indirect
7578
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
76-
k8s.io/utils v0.0.0-20231127182322-b307cd553661 // indirect
79+
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
7780
sigs.k8s.io/controller-runtime v0.16.3 // indirect
7881
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
7982
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
80-
sigs.k8s.io/yaml v1.3.0 // indirect
83+
sigs.k8s.io/yaml v1.4.0 // indirect
8184
)

0 commit comments

Comments
 (0)