-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split tests into client tests and provider tests
- Loading branch information
1 parent
60139e0
commit f915beb
Showing
3 changed files
with
74 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Go Client Tests | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- release/* | ||
pull_request: | ||
branches: | ||
- main | ||
- release/* | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ${{ matrix.os }} | ||
continue-on-error: ${{ matrix.experimental }} | ||
strategy: | ||
matrix: | ||
experimental: [false] | ||
go: ["1.16"] | ||
os: [ubuntu-latest] | ||
# Test against RouterOS v7 | ||
routeros_version: | ||
- "7.1" | ||
legacy_bgp_support: [true] | ||
|
||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v2.1.3 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2.3.4 | ||
|
||
- name: Get dependencies | ||
run: | | ||
go mod download | ||
- name: Build | ||
run: go build -v . | ||
|
||
- name: Set up RouterOS | ||
run: | | ||
sudo pip3 install routeros_api | ||
python3 .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 ./client | ||
env: | ||
ROS_HOSTURL: https://127.0.0.1 | ||
ROS_USERNAME: admin | ||
ROS_PASSWORD: '' | ||
ROS_INSECURE: true | ||
TF_ACC: 1 | ||
LEGACY_BGP_SUPPORT: ${{ matrix.legacy_bgp_support }} | ||
|
||
services: | ||
routeros: | ||
image: gnewbury/routeros:${{ matrix.routeros_version }} | ||
ports: | ||
- 443:443 | ||
- 8728:8728 | ||
volumes: | ||
- /dev/net/tun:/dev/net/tun | ||
options: >- | ||
--cap-add=NET_ADMIN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters