netbird/.github/workflows/golang-test-linux.yml
Maycon Santos 1cd1e84290
Run tests in serial and update multi-peer test (#269)
Updates test workflows with serial execution to avoid collision 
of ports and resource names.

Also, used -exec sudo flag for UNIX tests and removed not-needed
 limits configuration on Linux and added a 5 minutes timeout.

Updated the multi-peer tests in the client/internal/engine_test.go
 to provide proper validation when creating or starting 
a peer engine instance fails.

As some operations of the tests running on windows
 are slow, we will experiment with disabling the Defender before 
restoring cache and checkout a repository, then we reenable 
it to run the tests.

disabled extra logs for windows interface
2022-03-16 11:02:06 +01:00

42 lines
1.2 KiB
YAML

name: Test Code Linux
on: [push,pull_request]
jobs:
test:
strategy:
matrix:
go-version: [1.17.x]
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
# - name: update limits.d
# run: |
# cat <<'EOF' | sudo tee -a /etc/security/limits.d/wt.conf
# root soft nproc 65535
# root hard nproc 65535
# root soft nofile 65535
# root hard nofile 65535
# $(whoami) soft nproc 65535
# $(whoami) hard nproc 65535
# $(whoami) soft nofile 65535
# $(whoami) hard nofile 65535
# EOF
- name: Cache Go modules
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Checkout code
uses: actions/checkout@v2
- name: Install modules
run: go mod tidy
- name: Test
run: go test -exec sudo -timeout 5m -p 1 ./...