mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-25 01:23:22 +01:00
c88e6a7342
* Use reusable workflow and control push and pr test exec * use format * use path ref * Run tests on push to main and on PRs
53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
name: Test Code Windows
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
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
|
|
runs-on: windows-latest
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.18.x
|
|
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
%LocalAppData%\go-build
|
|
~\go\pkg\mod
|
|
~\AppData\Local\go-build
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-
|
|
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: syso
|
|
path: iface\
|
|
|
|
- name: Test
|
|
run: go test -tags=load_wgnt_from_rsrc -timeout 5m -p 1 ./... |