Skip to content

Commit 9426ab1

Browse files
committed
Add CI GitHub Actions workflow
1 parent d2ea39a commit 9426ab1

1 file changed

Lines changed: 35 additions & 1 deletion

File tree

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,45 @@
1-
name: Deploy WASM
1+
name: CI
22

33
on:
44
push:
55
branches: [main]
6+
pull_request:
7+
branches: [main]
68

79
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v6
14+
15+
- uses: actions/setup-go@v6
16+
with:
17+
go-version-file: go.mod
18+
19+
- name: Install system dependencies
20+
run: sudo apt-get install -y libasound2-dev libgl1-mesa-dev libxrandr-dev libxi-dev libxcursor-dev libxinerama-dev libxxf86vm-dev
21+
22+
- name: Lint
23+
run: go tool golangci-lint run
24+
25+
test:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v6
29+
30+
- uses: actions/setup-go@v6
31+
with:
32+
go-version-file: go.mod
33+
34+
- name: Install system dependencies
35+
run: sudo apt-get install -y libasound2-dev libgl1-mesa-dev libxrandr-dev libxi-dev libxcursor-dev libxinerama-dev libxxf86vm-dev
36+
37+
- name: Test
38+
run: go test ./...
39+
840
deploy:
41+
needs: [lint, test]
42+
if: github.ref == 'refs/heads/main'
943
runs-on: ubuntu-latest
1044
env:
1145
TARGET_DIR: target

0 commit comments

Comments
 (0)