Skip to content

Commit

Permalink
Merge pull request #1 from azyablov/dev
Browse files Browse the repository at this point in the history
CI workflow and dedicated clab instance
  • Loading branch information
azyablov authored May 5, 2023
2 parents 3d60ff1 + 788bca9 commit b2e27fd
Show file tree
Hide file tree
Showing 20 changed files with 76 additions and 8 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# SPDX-License-Identifier: BSD-3-Clause

---
name: JSON RPC client CI DEV workflow
run-name: CI DEV workflow
on:
push:
branches:
- dev

env:
CLAB_VER: 0.40.0

jobs:
build_and_test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup_go_env
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: go_version
run: go version
- name: docker_version
run: docker -v
- name: Pulling_docker_images
run: |
docker pull ghcr.io/hellt/network-multitool
docker pull ghcr.io/nokia/srlinux:22.11.2
- name: Unit_tests
run: go test -v
- name: clab_installation
run: bash -c "$(curl -sL https://get.containerlab.dev)" -- -v $CLAB_VER
- name: clab_deploy
if: ${{ success() }}
run: |
cd _clab
sudo clab deploy
- name: Integration_tests
if: ${{ success() }}
run: |
go test --tags integration -v
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
# vendor/

*.log
clab/.nokia-evpn.clab.yml.bak
clab/clab-evpn
_clab/.nokia-evpn.clab.yml.bak
_clab/clab-evpn

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions actions_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !integration

package srljrpc_test

import (
Expand Down
2 changes: 2 additions & 0 deletions client_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build integration

package srljrpc_test

import (
Expand Down
2 changes: 2 additions & 0 deletions commands_ext_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !integration

package srljrpc_test

import (
Expand Down
2 changes: 2 additions & 0 deletions commands_int_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !integration

package srljrpc

import (
Expand Down
2 changes: 2 additions & 0 deletions datastores_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !integration

package srljrpc_test

import (
Expand Down
2 changes: 2 additions & 0 deletions formats_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !integration

package srljrpc_test

import (
Expand Down
2 changes: 2 additions & 0 deletions messages_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !integration

package srljrpc_test

import (
Expand Down
2 changes: 2 additions & 0 deletions methods_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !integration

package srljrpc_test

import (
Expand Down
12 changes: 6 additions & 6 deletions testdata/integration_tests_params.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"port": 443,
"tls_attr": {
"skip_verify": false,
"cert_file": "./clab/clab-evpn/ca/spine1/spine1.pem",
"key_file": "./clab/clab-evpn/ca/spine1/spine1-key.pem",
"ca_file": "./clab/clab-evpn/ca/root/root-ca.pem"
"cert_file": "./_clab/clab-evpn/.tls/spine1/spine1.pem",
"key_file": "./_clab/clab-evpn/.tls/spine1/spine1.key",
"ca_file": "./_clab/clab-evpn/.tls/ca/ca.pem"
}
},
"cert_target_incorrect_ca": {
Expand All @@ -27,9 +27,9 @@
"port": 443,
"tls_attr": {
"skip_verify": false,
"cert_file": "./clab/clab-evpn/ca/spine1/spine1.pem",
"key_file": "./clab/clab-evpn/ca/spine1/spine1-key.pem",
"ca_file": "./clab/incorrect-root-ca.pem"
"cert_file": "./_clab/clab-evpn/.tls/spine1/spine1.pem",
"key_file": "./_clab/clab-evpn/.tls/spine1/spine1.key",
"ca_file": "./_clab/incorrect-root-ca.pem"
}
}
}

0 comments on commit b2e27fd

Please sign in to comment.