-
Notifications
You must be signed in to change notification settings - Fork 28
70 lines (62 loc) · 1.57 KB
/
continuous-integration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Continuous Integration
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
experimental: [false]
go: ["1.18"]
os: [ubuntu-latest]
# Test against latest stable release, v6 beta and v7 beta
routeros: ["6.48.3", "6.49beta54", "7.1beta6"]
include:
- experimental: true
go: 1.18
os: ubuntu-latest
routeros: "latest"
steps:
- name: Set up Go
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: Run linters
run: make lint
- name: Run provider tests
run: make testacc
env:
MIKROTIK_HOST: 127.0.0.1:8728
MIKROTIK_USER: admin
MIKROTIK_PASSWORD: ''
TF_ACC: 1
- name: Run client tests
run: make testclient
env:
MIKROTIK_HOST: 127.0.0.1:8728
MIKROTIK_USER: admin
MIKROTIK_PASSWORD: ''
TF_ACC: 1
services:
routeros:
image: evilfreelancer/docker-routeros:${{ matrix.routeros }}
ports:
- 8728:8728
volumes:
- /dev/net/tun:/dev/net/tun
options: >-
--cap-add=NET_ADMIN