Skip to content

Commit

Permalink
github workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Novak <[email protected]>
  • Loading branch information
micnovak committed Aug 16, 2023
1 parent 69babb3 commit 29fcf8d
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/gnmi-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow will install Python dependencies, run tests
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: gnmi-pytest-tests

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.10', '3.9' ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout gnmi-tools
uses: actions/checkout@v3
with:
repository: 'ConfD-Developer/gnmi-tools'
path: 'gnmi-tools'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install grpcio-tools
- name: Build gNMI stubs
run:
python -m grpc_tools.protoc -Ignmi-tools/src/proto --python_out=gnmi-tools/src --grpc_python_out=gnmi-tools/src gnmi-tools/src/proto/gnmi.proto gnmi-tools/src/proto/gnmi_ext.proto
- name: Start gNMI demo server
run:
python gnmi-tools/src/confd_gnmi_server.py -t demo --insecure &
- name: Test with Robot
run: |
export PYTHONPATH=./gnmi-tools/src:./:./General_gNMI:${PYTHONPATH}
robot --variablefile adapter.yaml --variablefile interfaces.yaml --variablefile defaults.yaml --include sanity --exclude OpenConfig ./

0 comments on commit 29fcf8d

Please sign in to comment.