-
Notifications
You must be signed in to change notification settings - Fork 234
100 lines (97 loc) · 2.78 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: ci
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
test:
name: Test go${{ matrix.goVersion}}.x ${{ matrix.goArch }}
strategy:
fail-fast: false
matrix:
include:
- goVersion: "1"
GOARCH: "amd64"
SKIP_PYTHON_BINDINGS_TESTS: "0"
# - goVersion: "1"
# GOARCH: "arm64"
# SKIP_PYTHON_BINDINGS_TESTS: "0"
# - goVersion: "1"
# GOARCH: "386"
# SKIP_PYTHON_BINDINGS_TESTS: "1"
# - goVersion: "1"
# GOARCH: "ppc64le"
# SKIP_PYTHON_BINDINGS_TESTS: "0"
- goVersion: "1.17"
GOARCH: "amd64"
SKIP_PYTHON_BINDINGS_TESTS: "0"
- goVersion: "1.18"
GOARCH: "amd64"
SKIP_PYTHON_BINDINGS_TESTS: "0"
- goVersion: "1.19"
GOARCH: "amd64"
SKIP_PYTHON_BINDINGS_TESTS: "0"
- goVersion: "1.20"
GOARCH: "amd64"
SKIP_PYTHON_BINDINGS_TESTS: "0"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.goVersion }}
- run: sudo apt install python3-dev python3-setuptools
- run: pip install -U wheel
- run: pip install -U pytest setuptools
- run: make install.dependencies
- run: make test
env:
GOARCH: ${{ matrix.GOARCH }}
CGO_ENABLED: "1"
SKIP_PYTHON_BINDINGS_TESTS: ${{ matrix.SKIP_PYTHON_BINDINGS_TESTS }}
bazel:
name: bazel test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cache/bazel
~/.cache/bazelisk
key: ${{ runner.os }}-bazel-cache
- run: bazel build //...
- run: bazel test //...
all:
name: Check all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sudo apt install python3-dev python3-setuptools
- run: pip install -U wheel
- run: pip install -U pytest setuptools
# - uses: golangci/golangci-lint-action@v2
# with:
# version: v1.30.0
- run: make all
- name: Install goveralls
env:
GO111MODULE: off
run: |
export GOPATH=$GITHUB_WORKSPACE
go get github.com/mattn/goveralls
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./bin/goveralls -coverprofile=coverage.out -service=github
goreleaser:
name: Goreleaser
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: goreleaser/goreleaser-action@v2
with:
args: release --snapshot --skip-publish --rm-dist