-
Notifications
You must be signed in to change notification settings - Fork 88
107 lines (87 loc) · 2.34 KB
/
go.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Go Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: stable
id: go
- name: Run Tests (Linux)
if: runner.os == 'Linux'
run: make check
- name: Run Short Tests (Non-Linux)
if: runner.os != 'Linux'
run: make check
- name: Upload Code Coverage
if: runner.os == 'Linux'
run: bash <(curl -s https://codecov.io/bash)
winbuild:
name: Build (Windows)
runs-on: [ windows-latest ]
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: stable
id: go
- name: Install make (Windows)
run: |
choco install -y make mingw
- name: Run Short Tests (Non-Linux)
run: |
go test ./... -short
docker:
name: Docker build
runs-on: [ ubuntu-latest ]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: stable
id: go
- name: Setup Node / NPM
if: runner.os == 'Linux'
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Check out code into the Go module directory
uses: actions/checkout@v3
# disable and stop mono-xsp4.service
# Details: https://github.com/actions/virtual-environments/issues/2821
- name: Ubuntu 20.04 Cleanup
if: runner.os == 'Linux'
run: |
sudo systemctl disable mono-xsp4.service || true
sudo systemctl stop mono-xsp4.service || true
sudo killall mono || true
- name: Build Frontend
run: make build
- name: Docker Build
if: runner.os == 'Linux'
run: make docker-hub
- name: Build batchsearch
if: runner.os == 'Linux'
run: make build-batchsearch
# - name: Integration Test
# if: runner.os == 'Linux'
# run: make test-integration
- name: Test Cleanup
if: runner.os == 'Linux' && always()
run: |
docker compose logs
make clean-integration