Skip to content

Commit 5bab91b

Browse files
committed
Use GitHub Actions for CI
This is mostly a copy of the workflow from the github.com/containerd/typeurl repository. After this we can remove travis. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent bfba540 commit 5bab91b

2 files changed

Lines changed: 74 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
11+
build:
12+
name: TTRPC CI
13+
runs-on: ubuntu-18.04
14+
timeout-minutes: 5
15+
steps:
16+
17+
- name: Set up Go 1.15
18+
uses: actions/setup-go@v2
19+
with:
20+
go-version: 1.15
21+
id: go
22+
23+
- name: Setup Go binary path
24+
shell: bash
25+
run: |
26+
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
27+
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
28+
29+
- name: Check out code
30+
uses: actions/checkout@v2
31+
with:
32+
path: src/github.com/containerd/ttrpc
33+
fetch-depth: 25
34+
35+
- name: Checkout project
36+
uses: actions/checkout@v2
37+
with:
38+
repository: containerd/project
39+
path: src/github.com/containerd/project
40+
41+
- name: Install dependencies
42+
env:
43+
GO111MODULE: off
44+
run: |
45+
go get -u github.com/vbatts/git-validation
46+
go get -u github.com/kunalkushwaha/ltag
47+
48+
- name: Check DCO/whitespace/commit message
49+
env:
50+
GITHUB_COMMIT_URL: ${{ github.event.pull_request.commits_url }}
51+
DCO_VERBOSITY: "-q"
52+
DCO_RANGE: ""
53+
working-directory: src/github.com/containerd/ttrpc
54+
run: |
55+
if [ -z "${GITHUB_COMMIT_URL}" ]; then
56+
DCO_RANGE=$(jq -r '.before +".."+ .after' ${GITHUB_EVENT_PATH})
57+
else
58+
DCO_RANGE=$(curl ${GITHUB_COMMIT_URL} | jq -r '.[0].parents[0].sha +".."+ .[-1].sha')
59+
fi
60+
../project/script/validate/dco
61+
62+
- name: Check file headers
63+
run: ../project/script/validate/fileheader ../project/
64+
working-directory: src/github.com/containerd/ttrpc
65+
66+
- name: Test
67+
working-directory: src/github.com/containerd/ttrpc
68+
run: |
69+
go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
70+
71+
- name: Codecov
72+
run: bash <(curl -s https://codecov.io/bash)
73+
working-directory: src/github.com/containerd/ttrpc

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# ttrpc
22

3+
[![Build Status](https://github.com/containerd/ttrpc/workflows/CI/badge.svg)](https://github.com/containerd/ttrpc/actions?query=workflow%3ACI)
34
[![Build Status](https://travis-ci.org/containerd/ttrpc.svg?branch=master)](https://travis-ci.org/containerd/ttrpc)
45

56
GRPC for low-memory environments.

0 commit comments

Comments
 (0)