Skip to content

Commit b31c945

Browse files
committed
ci: Modernize test job
1 parent aa10a85 commit b31c945

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

.github/workflows/main.yml

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
name: CI
22

3-
on: [push]
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_call:
411

512
jobs:
613

@@ -11,8 +18,8 @@ jobs:
1118
GOPATH: /home/runner/go
1219

1320
steps:
14-
- uses: actions/checkout@v1
15-
- uses: actions/setup-go@v1
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-go@v5
1623
with:
1724
go-version: stable
1825

@@ -22,6 +29,12 @@ jobs:
2229
- run: sudo apt install libusb-1.0-0-dev libfreenect-dev
2330
- run: go mod download
2431

32+
- name: Check go mod
33+
run: |
34+
go mod tidy
35+
git diff --exit-code go.mod
36+
git diff --exit-code go.sum
37+
2538
- run: gofmt -s -d .
2639
- run: $GOPATH/bin/golint -min_confidence 0.3 $(go list ./...)
2740
- run: go build -tags kinect ./cmd/shady/

0 commit comments

Comments
 (0)