mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-20 17:58:02 +02:00
commit
8b31088968
31
.github/workflows/golang-test.yml
vendored
31
.github/workflows/golang-test.yml
vendored
@ -18,4 +18,33 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Test
|
- name: Test
|
||||||
run: go test ./...
|
run: go test ./...
|
||||||
|
|
||||||
|
test_build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ windows, linux, darwin ]
|
||||||
|
go-version: [1.16.x]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: ${{ matrix.go-version }}
|
||||||
|
|
||||||
|
- name: Cache Go modules
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-go-
|
||||||
|
|
||||||
|
- name: Install modules
|
||||||
|
run: go mod tidy
|
||||||
|
|
||||||
|
- name: run build
|
||||||
|
run: GOOS=${{ matrix.os }} go build .
|
@ -18,7 +18,7 @@ func assignAddr(address string, tunDevice tun.Device) error {
|
|||||||
ip := strings.Split(address, "/")
|
ip := strings.Split(address, "/")
|
||||||
cmd := exec.Command("ifconfig", ifaceName, "inet", address, ip[0])
|
cmd := exec.Command("ifconfig", ifaceName, "inet", address, ip[0])
|
||||||
if out, err := cmd.CombinedOutput(); err != nil {
|
if out, err := cmd.CombinedOutput(); err != nil {
|
||||||
log.Infoln("Command: %v failed with output %s and error: ", cmd.String(), out)
|
log.Infof("Command: %v failed with output %s and error: ", cmd.String(), out)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
_, resolvedNet, err := net.ParseCIDR(address)
|
_, resolvedNet, err := net.ParseCIDR(address)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user