-
Notifications
You must be signed in to change notification settings - Fork 931
65 lines (57 loc) · 1.33 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Client build and unit tests
on:
- push
- pull_request
jobs:
test:
strategy:
fail-fast: false
matrix:
go:
- 1.16.x
- 1.17.x
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Checkout code
uses: actions/checkout@v2
- name: Test client package
env:
CGO_ENABLED: 0
run: go test -v ./client/...
- name: Test lxc package
env:
CGO_ENABLED: 0
run: go test -v ./lxc/...
- name: Test shared package
env:
CGO_ENABLED: 0
run: go test -v ./shared/...
- name: Create build directory
run: |
mkdir bin
- name: Build static lxc
env:
CGO_ENABLED: 0
run: |
go build -o bin ./lxc
- name: Build static lxd-p2c
if: runner.os == 'Linux'
env:
CGO_ENABLED: 0
run: |
go build -o bin ./lxd-p2c
- name: Upload artifacts
uses: actions/upload-artifact@v3
if: matrix.go == '1.17.x'
continue-on-error: true
with:
name: ${{ runner.os }}
path: bin/