netmaker/.github/workflows/test.yml

49 lines
1.4 KiB
YAML
Raw Normal View History

name: Integration Test
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Build
run: |
2022-03-05 02:36:48 +08:00
env CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build main.go
cd netclient
2022-03-04 05:19:25 +08:00
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build main.go
env CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 go build main.go
env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build main.go
env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build main.go
2022-05-06 01:28:33 +08:00
env CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -tags=gui main.go
env CGO_ENABLED=1 GOOS=freebsd GOARCH=amd64 go build -tags=gui main.go
env CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -tags=gui main.go
env CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -tags=gui main.go
tests:
env:
2021-10-20 03:53:01 +08:00
DATABASE: sqlite
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
2022-01-07 04:05:38 +08:00
- name: Setup Go
uses: actions/setup-go@v2
with:
2022-04-22 16:44:15 +08:00
go-version: 1.18
- name: run tests
run: |
go test -p 1 ./... -v
env:
2021-10-20 03:53:01 +08:00
DATABASE: sqlite
CLIENT_MODE: "off"