forked from go-zeromq/zmq4
-
Notifications
You must be signed in to change notification settings - Fork 0
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.20.x, 1.19.x]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
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: "2022.1"
- name: Upload code coverage
uses: codecov/codecov-action@v1