-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 1.62 KB
/
ci.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
name: CI
on:
pull_request:
branches: [ master ]
jobs:
build:
strategy:
fail-fast: false
matrix:
go-version: [1.21.x]
test-type:
- general
# - with-display
platform:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.platform }}
env:
DISPLAY: ':99.0'
EGL_PLATFORM: 'x11'
steps:
- name: install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: checkout code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: non-Go linux dependencies
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -qq libudev-dev
- name: non-Go linux display test dependencies
if: matrix.platform == 'ubuntu-latest' && matrix.test-type == 'with-display'
run: |
sudo apt-get install -qq libxss-dev gcc pkg-config libwayland-dev libx11-dev libx11-xcb-dev libxkbcommon-x11-dev libgles2-mesa-dev libegl1-mesa-dev libffi-dev libxcursor-dev libvulkan-dev
# Start a virtual frame buffer.
Xvfb :99 -screen 0 1920x1024x24 &
- name: unit tests
if: matrix.test-type == 'general'
run: |
go test ./rpc ./internal/... ./cmd/*/api ./cmd/worklog/store
- name: integration tests
if: matrix.test-type == 'general'
run: |
go test -p=1 -run TestDaemon ./cmd/{rest,runner,worklog} -verbose_log
- name: dislay integration tests
if: matrix.test-type == 'with-display'
run: |
go test -p=1 -run TestDaemon ./cmd/watcher -verbose_log