Skip to content

ipv4 unicast message validation #33

ipv4 unicast message validation

ipv4 unicast message validation #33

Workflow file for this run

name: cicd
on:
push:
branches:
- main
pull_request:
jobs:
tests:
strategy:
matrix:
go-version: [1.20.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Environment
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: "**/go.sum"
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Require: The version of golangci-lint to use.
version: v1.53
- name: Run go tests
run: |
go test ./...
go test -race ./...
- name: Build binary
run: make build
integration_tests:
needs: [tests]
strategy:
matrix:
os: [ubuntu-latest]
go-version: [1.20.x]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: setup host kernel parameters
run: ./build/set_kernel_params.sh
- name: Setup Environment
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: "**/go.sum"
- name: Build gobmp container
run: make container REGISTRY_NAME=localhost IMAGE_VERSION=cicd
- name: Build validator binary
run: make validator
- name: pulling XRd container
run: docker pull sbezverk/xrd-control-plane:7.9.2
- name: check for gobmp container
run: docker images
- name: starts unicast v4 integration test
run: docker compose -f ./build/unicastv4-bgp/test_bed.yml up --detach
- name: check conection to kafka and bmp session with a router
id: session
run: ./build/monitor_container.sh gobmp
continue-on-error: true
- name: run validator for ipv4 unicast
id: validation
run: ./bin/validator --validate=true --kafka=127.0.0.1:9092 --msg-file=./testdata/validator/ipv4_unicast.msg
continue-on-error: true
- name: Check on failures
if: steps.session.outcome != 'success' || steps.validation.outcome != 'success'
run: |
docker ps -a
docker logs gobmp
docker logs xr-1
exit 1