netmaker/.github/workflows/test.yml

66 lines
1.9 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-05-06 01:49:22 +08:00
sudo apt-get install -y gcc libgl1-mesa-dev xorg-dev
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
2022-05-06 02:03:08 +08:00
#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
2022-05-06 02:03:08 +08:00
test-linux:
env:
2022-05-06 02:05:43 +08:00
DATABASE: sqlite
2022-05-06 02:03:08 +08:00
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: run tests
run: |
sudo apt-get install -y gcc libgl1-mesa-dev xorg-dev
go test -p 1 ./... -v
env:
DATABASE: sqlite
CLIENT_MODE: "off"
test-darwin:
env:
2022-05-06 02:05:43 +08:00
DATABASE: sqlite
2022-05-06 02:03:08 +08:00
runs-on: macos-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: |
2022-05-06 02:03:08 +08:00
xcode-select install
go test -p 1 ./... -v
env:
2021-10-20 03:53:01 +08:00
DATABASE: sqlite
CLIENT_MODE: "off"