File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Deploy WASM
1+ name : CI
22
33on :
44 push :
55 branches : [main]
6+ pull_request :
7+ branches : [main]
68
79jobs :
10+ lint :
11+ name : Lint
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v6
15+
16+ - uses : actions/setup-go@v6
17+ with :
18+ go-version-file : go.mod
19+ cache : true
20+
21+ - name : Install system dependencies
22+ run : sudo apt-get install -y libasound2-dev libgl1-mesa-dev libxrandr-dev libxi-dev libxcursor-dev libxinerama-dev libxxf86vm-dev
23+
24+ - name : Lint
25+ run : go tool golangci-lint run
26+
27+ test :
28+ name : Test
29+ runs-on : ubuntu-latest
30+ steps :
31+ - uses : actions/checkout@v6
32+
33+ - uses : actions/setup-go@v6
34+ with :
35+ go-version-file : go.mod
36+ cache : true
37+
38+ - name : Install system dependencies
39+ run : sudo apt-get install -y libasound2-dev libgl1-mesa-dev libxrandr-dev libxi-dev libxcursor-dev libxinerama-dev libxxf86vm-dev xvfb
40+
41+ - name : Test
42+ run : xvfb-run go test ./...
43+
844 deploy :
45+ name : Deploy
46+ needs : [lint, test]
47+ if : github.ref == 'refs/heads/main'
948 runs-on : ubuntu-latest
1049 env :
1150 TARGET_DIR : target
1554 - uses : actions/setup-go@v6
1655 with :
1756 go-version-file : go.mod
57+ cache : true
1858
1959 - name : Build WASM
2060 run : GOOS=js GOARCH=wasm go build -o river-raid.wasm .
You can’t perform that action at this time.
0 commit comments