mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-22 16:13:31 +01:00
1cd1e84290
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
58 lines
1.3 KiB
YAML
58 lines
1.3 KiB
YAML
name: Test Code Windows
|
|
on: [push,pull_request]
|
|
jobs:
|
|
pre:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
- run: bash -x wireguard_nt.sh
|
|
working-directory: client
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: syso
|
|
path: client/*.syso
|
|
retention-days: 1
|
|
|
|
test:
|
|
needs: pre
|
|
strategy:
|
|
matrix:
|
|
go-version: [1.17.x]
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: disable defender
|
|
run: Set-MpPreference -DisableRealtimeMonitoring $true
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
%LocalAppData%\go-build
|
|
~/go/pkg/mod
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-
|
|
|
|
- name: enable defender
|
|
run: Set-MpPreference -DisableRealtimeMonitoring $false
|
|
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: syso
|
|
path: iface\
|
|
|
|
# - name: Install modules
|
|
# run: go mod tidy
|
|
|
|
- name: Test
|
|
run: go test -tags=load_wgnt_from_rsrc -timeout 5m -p 1 ./...
|