-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (38 loc) · 1.05 KB
/
test.yml
File metadata and controls
45 lines (38 loc) · 1.05 KB
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
name: Test
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go: ['1.24.x', '1.25.x']
name: Test with Go ${{ matrix.go }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
DISPLAY: ':99.0'
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Install dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install libasound2-dev libgl1-mesa-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev
- name: Xvfb
if: runner.os == 'Linux'
run: |
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Vet
run: |
go build ./internal/vettool
go vet -vettool=./vettool${{ runner.os == 'Windows' && '.exe' || '' }} -v ./...
- name: Test
run: |
go test -vet=all -v ./...