forked from googollee/go-socket.io
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.23 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
54
55
56
57
58
name: CI
permissions:
contents: read
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '0 8 * * 1' # run "At 08:00 on Monday"
jobs:
build:
name: ${{ matrix.os }} Go (${{ matrix.go }})
timeout-minutes: 5
strategy:
matrix:
go: ['stable','oldstable']
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go 1.x
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
check-latest: true
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Check go version
run: go version
- name: Go Format
run: gofmt -s -w . && git diff --exit-code
- name: Go Tidy
run: go mod tidy && git diff --exit-code
- name: Go Mod Verify
run: go mod verify
- name: Run linter
uses: golangci/golangci-lint-action@v3
with:
version: latest
skip-cache: true
skip-pkg-cache: true
skip-build-cache: true
- name: Run tests
run: |
make test
- name: Run benchmarks
run: |
make bench