Skip to content

Vaerh/issue232

Vaerh/issue232 #126

Workflow file for this run

name: Go Client Tests
on:
pull_request:
branches:
- 'main'
- 'devel'
paths:
- 'main.go'
- 'routeros/*.go'
- '.github/workflows/*.yml'
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
experimental: [false]
go:
- 1.19
os: [ubuntu-latest]
routeros_version:
- "7.7"
- "7.8"
- "7.9"
steps:
- name: Setup Go environment
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Get dependencies
run: |
go mod download
- name: Build
run: go build -v .
- name: Preparing RouterOS for testing
run: |
python -m pip install --upgrade pip
python -m venv env
source env/bin/activate
pip install routeros_api
python .github/scripts/setup_routeros.py
env:
ROS_USERNAME: admin
ROS_PASSWORD: ''
ROS_IP_ADDRESS: 127.0.0.1
- name: Run client tests
run: go test -timeout 30m -v ./routeros
env:
ROS_HOSTURL: https://127.0.0.1
ROS_USERNAME: admin
ROS_PASSWORD: ''
ROS_INSECURE: true
TF_ACC: 1
ROS_VERSION: ${{ matrix.routeros_version }}
services:
routeros:
image: vaerhme/routeros:v${{ matrix.routeros_version }}
ports:
- 443:443
- 8728:8728
- 8729:8729
volumes:
- /dev/net/tun:/dev/net/tun
options: >-
--cap-add=NET_ADMIN
--entrypoint /routeros/entrypoint_with_four_interfaces.sh