Skip to content

Commit 9a6a79c

Browse files
authored
ci: add gha
1 parent 59e906c commit 9a6a79c

File tree

2 files changed

+59
-4
lines changed

2 files changed

+59
-4
lines changed

.github/workflows/ci.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
schedule:
9+
- cron: '0 2 * * 1-5'
10+
11+
env:
12+
GOPROXY: "https://proxy.golang.org"
13+
GO111MODULE: "on"
14+
TAGS: "-tags=czmq4"
15+
16+
jobs:
17+
18+
build:
19+
name: Build
20+
strategy:
21+
matrix:
22+
go-version: [1.15.x, 1.14.x]
23+
platform: [ubuntu-latest]
24+
#platform: [ubuntu-latest, macos-latest, windows-latest]
25+
runs-on: ${{ matrix.platform }}
26+
steps:
27+
- name: Install Go
28+
uses: actions/setup-go@v2
29+
with:
30+
go-version: ${{ matrix.go-version }}
31+
32+
- name: Cache-Go
33+
uses: actions/cache@v1
34+
with:
35+
path: ~/go/pkg/mod
36+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
37+
restore-keys: |
38+
${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
39+
40+
- name: Checkout code
41+
uses: actions/checkout@v2
42+
43+
- name: Install Linux packages
44+
if: matrix.platform == 'ubuntu-latest'
45+
run: |
46+
curl http://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-stable/xUbuntu_16.04/Release.key | sudo apt-key add -
47+
echo "deb http://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-stable/xUbuntu_16.04/ ./" | sudo tee -a /etc/apt/sources.list > /dev/null
48+
sudo apt-get update -qq -y
49+
sudo apt-get install -y libsodium-dev libczmq-dev
50+
51+
- name: Build-Linux-64b
52+
run: |
53+
GOARCH=amd64 go install -v $TAGS ./...
54+
- name: Test Linux
55+
run: |
56+
./.ci/code-coverage.sh
57+
- name: Upload-Coverage
58+
uses: codecov/codecov-action@v1

.travis.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ before_script:
2525
script:
2626
- go get -d -t -v $TAGS ./...
2727
- go install -v $TAGS ./...
28-
- ./.ci/code-coverage.sh
29-
30-
after_success:
31-
- bash <(curl -s https://codecov.io/bash)
28+
- go test -v $TAGS ./...
3229

3330
notifications:
3431
email:

0 commit comments

Comments
 (0)