Skip to content

Commit 0519da6

Browse files
authored
Merge pull request #5 from edcdavid/add-systests
Add System tests fron l2discovery-examples
2 parents 8365b7a + bdfae38 commit 0519da6

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

.github/workflows/pre-main.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,17 @@ jobs:
3535
- name: Disable default go problem matcher
3636
run: echo "::remove-matcher owner=go::"
3737

38-
- name: Check out code
38+
- name: Check out l2discovery-lib code
3939
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4040
with:
4141
ref: ${{ github.sha }}
42+
43+
- name: Check out l2discovery-examples code
44+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
45+
with:
46+
repository: redhat-cne/graphsolver-examples
47+
ref: main
48+
path: examples
4249

4350
- name: Extract dependent Pull Requests
4451
uses: depends-on/depends-on-action@9e8a61fce18b15281e831f1bba0e14c71d1e1f46 # main
@@ -72,8 +79,8 @@ jobs:
7279
run: make build
7380
env:
7481
SHELL: /bin/bash
75-
76-
- name: Run Tests
82+
83+
- name: Run examples cluster tests with this latest l2discovery-lib code
7784
run: make test
7885
env:
7986
SHELL: /bin/bash

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ install-lint:
99
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${GO_PATH}/bin ${GOLANGCI_VERSION}
1010
vet:
1111
go vet ${GO_PACKAGES}
12+
test:
13+
./scripts/test.sh

scripts/test.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
set -o nounset -o pipefail
3+
4+
# CD in the examples repo
5+
cd examples || exit
6+
7+
# Get latest changes
8+
echo "replace github.com/redhat-cne/l2discovery-lib => .." >>go.mod
9+
go mod tidy
10+
go mod vendor
11+
12+
# Test them in examples repository
13+
make test

0 commit comments

Comments
 (0)