-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (40 loc) · 1.12 KB
/
ci.yaml
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
name: ci
on:
push:
branches: [ "master" ]
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21.0
- name: Install Gio Dependencies
run: sudo apt install 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
- name: Build
run: go build -v ./...
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest
- name: Install gofumpt
run: go install mvdan.cc/gofumpt@latest
- name: Format
run: goimports -w . && gofumpt -w .
- name: Verify
run: |
if [ -n "$(git diff)" ]; then
git diff
exit 1
fi
- name: Test
run: go test -v ./...
- name: Vet
run: go vet -v ./...
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: staticcheck
run: staticcheck ./...