Fix freebsd tests (#2346)

This commit is contained in:
Evgenii 2024-07-31 08:58:04 +01:00 committed by GitHub
parent da39c8bbca
commit 9d2047a08a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 15 deletions

View File

@ -13,7 +13,7 @@ concurrency:
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Test in FreeBSD - name: Test in FreeBSD
@ -21,19 +21,15 @@ jobs:
uses: vmactions/freebsd-vm@v1 uses: vmactions/freebsd-vm@v1
with: with:
usesh: true usesh: true
copyback: false
release: "14.1"
prepare: | prepare: |
pkg install -y curl pkg install -y go
pkg install -y git
# -x - to print all executed commands
# -e - to faile on first error
run: | run: |
set -x set -e -x
curl -o go.tar.gz https://go.dev/dl/go1.21.11.freebsd-amd64.tar.gz -L go build -o netbird client/main.go
tar zxf go.tar.gz go test -timeout 5m -p 1 -failfast ./iface/...
mv go /usr/local/go go test -timeout 5m -p 1 -failfast ./client/...
ln -s /usr/local/go/bin/go /usr/local/bin/go
go mod tidy
go test -timeout 5m -p 1 ./iface/...
go test -timeout 5m -p 1 ./client/...
cd client
go build .
cd ..

View File

@ -1,4 +1,4 @@
//go:build darwin || dragonfly || freebsd || netbsd || openbsd //go:build darwin
package main package main