netmaker/.github/workflows/test.yml

85 lines
2.2 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:
2022-05-06 02:27:47 +08:00
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 02:27:47 +08:00
linux-gui:
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
2022-05-06 02:27:47 +08:00
- name: Build
2022-05-06 02:03:08 +08:00
run: |
2022-05-06 02:27:47 +08:00
sudo apt-get install -y gcc libgl1-mesa-dev xorg-dev
env CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -tags=gui main.go
mac-gui:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Build mac
run: |
env CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -tags=gui main.go
2022-05-06 03:30:01 +08:00
win-gui:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.18
2022-05-06 03:32:58 +08:00
- name: Mysys2 setup
2022-05-06 03:35:15 +08:00
uses: msys2/setup-msys2@v2
2022-05-06 03:30:01 +08:00
with:
install: >-
git
mingw-w64-x86_64-toolchain
2022-05-06 03:32:58 +08:00
- name: Build win gui
2022-05-06 03:30:01 +08:00
run: |
env CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -tags=gui main.go
2022-05-06 02:27:47 +08:00
tests:
2022-05-06 02:03:08 +08:00
env:
2022-05-06 02:05:43 +08:00
DATABASE: sqlite
2022-05-06 02:27:47 +08:00
runs-on: ubuntu-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:27:47 +08:00
sudo apt-get install -y gcc libgl1-mesa-dev xorg-dev
go test -p 1 ./... -v
env:
2021-10-20 03:53:01 +08:00
DATABASE: sqlite
CLIENT_MODE: "off"