-
Notifications
You must be signed in to change notification settings - Fork 55
55 lines (43 loc) · 1.13 KB
/
ci.yml
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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
TAGS: "-tags=czmq4"
jobs:
main:
strategy:
matrix:
platform: [ubuntu-latest]
go-version: [1.21.x, 1.20.x]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Install Linux packages
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update -qq -y
sudo apt-get install -y libsodium-dev libczmq-dev
- name: go install
run: GOARCH=amd64 go install -v $TAGS ./...
- name: Test Linux
run: ./.ci/code-coverage.sh
- name: Verify code formatting
run: |
test -z $(gofmt -l .)
- name: Run linter
uses: dominikh/staticcheck-action@v1
with:
install-go: false
cache-key: ${{ matrix.platform }}
version: "2023.1"
- name: Upload code coverage
uses: codecov/codecov-action@v3