-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from edcdavid/ci
New organization and CI
- Loading branch information
Showing
10 changed files
with
143 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[maxbodylength] | ||
disabled = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Test Incoming Changes | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
TERM: xterm-color | ||
CM_BIN: /usr/local/bin/checkmake | ||
CM_URL_LINUX: https://github.com/mrtazz/checkmake/releases/download/0.2.2/checkmake-0.2.2.linux.amd64 # yamllint disable-line | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint-and-test: | ||
name: Run Linters, Vet and unit tests | ||
runs-on: ubuntu-22.04 | ||
env: | ||
SHELL: /bin/bash | ||
|
||
steps: | ||
- name: Set up Go 1.22 | ||
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
go-version: 1.22.5 | ||
|
||
- name: Disable default go problem matcher | ||
run: echo "::remove-matcher owner=go::" | ||
|
||
- name: Check out code | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
with: | ||
ref: ${{ github.sha }} | ||
|
||
- name: Extract dependent Pull Requests | ||
uses: depends-on/depends-on-action@9e8a61fce18b15281e831f1bba0e14c71d1e1f46 # main | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install checkmake | ||
run: | | ||
curl --location --output $CM_BIN --silent $CM_URL_LINUX | ||
chmod +x $CM_BIN | ||
- name: Install Shfmt | ||
uses: mfinelli/setup-shfmt@031e887e39d899d773a7e9b6dd6472c2c23ff50d # v3.0.1 | ||
|
||
- name: Golangci-lint | ||
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0 | ||
with: | ||
version: v1.59 | ||
args: --timeout 10m0s | ||
|
||
- name: Checkmake | ||
run: checkmake --config=.checkmake Makefile | ||
|
||
- name: Shfmt | ||
run: shfmt -d scripts | ||
|
||
- name: ShellCheck | ||
uses: ludeeus/action-shellcheck@00b27aa7cb85167568cb48a3838b75f4265f2bca # master | ||
|
||
- name: Go vet | ||
run: make vet | ||
|
||
- name: Run Build | ||
run: make build | ||
env: | ||
SHELL: /bin/bash | ||
|
||
- name: Run Tests | ||
run: make test | ||
env: | ||
SHELL: /bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
module github.com/redhat-best-practices-for-k8s/graphsolver-minimal | ||
|
||
go 1.22.5 | ||
|
||
toolchain go1.22.6 | ||
go 1.22 | ||
|
||
require ( | ||
github.com/redhat-best-practices-for-k8s/graphsolver-lib v0.0.4 | ||
github.com/redhat-best-practices-for-k8s/l2discovery-exports v0.0.4 | ||
github.com/redhat-cne/graphsolver-lib v0.0.5 | ||
github.com/redhat-cne/l2discovery-exports v0.0.4 | ||
) | ||
|
||
require ( | ||
github.com/redhat-best-practices-for-k8s/graphsolver-exports v0.0.2 // indirect | ||
github.com/redhat-cne/graphsolver-exports v0.0.2 // indirect | ||
github.com/sirupsen/logrus v1.9.3 // indirect | ||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
make build | ||
./basic 2>&1| sed 's/time="[^"]*" //' > test/actual.txt | ||
diff test/actual.txt test/expected.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
level=info msg="Solutions for OC problem" | ||
level=info msg="p0= node1 : ens3f0" | ||
level=info msg="p1= node2 : ens3f0" | ||
level=info msg=--- | ||
level=info msg="p0= node2 : ens3f0" | ||
level=info msg="p1= node1 : ens3f0" | ||
level=info msg=--- |