forked from ddelnano/terraform-provider-mikrotik
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (62 loc) · 1.56 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 6.x and 7.x and "latest" stable
routeros: ["6.49.15", "7.14.3"]
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: mnazarenko/docker-routeros:${{ matrix.routeros }}
ports:
- 8728:8728
volumes:
- /dev/net/tun:/dev/net/tun
options: >-
--cap-add=NET_ADMIN