Skip to content

Commit

Permalink
Merge pull request #5 from edcdavid/add-systests
Browse files Browse the repository at this point in the history
Add System tests fron l2discovery-examples
  • Loading branch information
edcdavid authored Aug 21, 2024
2 parents 8365b7a + bdfae38 commit 0519da6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/pre-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,17 @@ jobs:
- name: Disable default go problem matcher
run: echo "::remove-matcher owner=go::"

- name: Check out code
- name: Check out l2discovery-lib code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: ${{ github.sha }}

- name: Check out l2discovery-examples code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
repository: redhat-cne/graphsolver-examples
ref: main
path: examples

- name: Extract dependent Pull Requests
uses: depends-on/depends-on-action@9e8a61fce18b15281e831f1bba0e14c71d1e1f46 # main
Expand Down Expand Up @@ -72,8 +79,8 @@ jobs:
run: make build
env:
SHELL: /bin/bash

- name: Run Tests
- name: Run examples cluster tests with this latest l2discovery-lib code
run: make test
env:
SHELL: /bin/bash
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ install-lint:
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${GO_PATH}/bin ${GOLANGCI_VERSION}
vet:
go vet ${GO_PACKAGES}
test:
./scripts/test.sh
13 changes: 13 additions & 0 deletions scripts/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
set -o nounset -o pipefail

# CD in the examples repo
cd examples || exit

# Get latest changes
echo "replace github.com/redhat-cne/l2discovery-lib => .." >>go.mod
go mod tidy
go mod vendor

# Test them in examples repository
make test

0 comments on commit 0519da6

Please sign in to comment.