Skip to content

Commit 07d9bdd

Browse files
committed
ci: switch to GitHub Actions and bump Go to 1.15
Let's join the 21st century. Signed-off-by: Dan Williams <[email protected]>
1 parent 87390b5 commit 07d9bdd

File tree

3 files changed

+61
-50
lines changed

3 files changed

+61
-50
lines changed

.github/workflows/test.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
name: test
3+
4+
on: ["push", "pull_request"]
5+
6+
env:
7+
GO_VERSION: "1.15"
8+
LINUX_ARCHES: "amd64 386 arm arm64 s390x mips64le ppc64le"
9+
10+
jobs:
11+
build:
12+
name: Build all linux architectures
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: setup go
16+
uses: actions/setup-go@v1
17+
with:
18+
go-version: ${{ env.GO_VERSION }}
19+
- uses: actions/checkout@v2
20+
21+
- name: Build on all supported architectures
22+
run: |
23+
set -e
24+
for arch in ${LINUX_ARCHES}; do
25+
echo "Building for arch $arch"
26+
GOARCH=$arch make
27+
rm bin/*
28+
done
29+
30+
test-linux:
31+
name: Run tests on Linux amd64
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: setup go
35+
uses: actions/setup-go@v1
36+
with:
37+
go-version: ${{ env.GO_VERSION }}
38+
- uses: actions/checkout@v2
39+
40+
- name: Install test binaries
41+
env:
42+
GO111MODULE: off
43+
run: |
44+
go get golang.org/x/tools/cmd/cover
45+
go get github.com/modocache/gover
46+
go get github.com/mattn/goveralls
47+
go get -t ./...
48+
49+
- name: test
50+
run: PATH=$PATH:$(go env GOPATH)/bin COVERALLS=1 ./test_linux.sh
51+
52+
- name: Send coverage to coveralls
53+
env:
54+
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
run: |
56+
PATH=$PATH:$(go env GOPATH)/bin
57+
gover
58+
goveralls -coverprofile=gover.coverprofile -service=github
59+

.travis.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

pkg/ocicni/ocicni.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ func (plugin *cniNetworkPlugin) SetUpPodWithContext(ctx context.Context, podNetw
541541
if err := plugin.forEachNetwork(&podNetwork, false, func(network *cniNetwork, podNetwork *PodNetwork, rt *libcni.RuntimeConf) error {
542542
result, err := network.addToNetwork(ctx, rt, plugin.cniConfig)
543543
if err != nil {
544-
logrus.Errorf("Error while adding pod to CNI network %q: %s", network.name, err)
544+
logrus.Errorf("Error while adding pod todddddd CNI network %q: %s", network.name, err)
545545
return err
546546
}
547547
results = append(results, NetResult{
@@ -810,7 +810,7 @@ func buildCNIRuntimeConf(podNetwork *PodNetwork, ifName string, runtimeConfig Ru
810810
}
811811

812812
// Propagate existing CNI_ARGS to non-k8s consumers
813-
for _, kvpairs := range strings.Split(os.Getenv("CNI_ARGS"), ";"){
813+
for _, kvpairs := range strings.Split(os.Getenv("CNI_ARGS"), ";") {
814814
if keyval := strings.SplitN(kvpairs, "=", 2); len(keyval) == 2 {
815815
rt.Args = append(rt.Args, [2]string{keyval[0], keyval[1]})
816816
}

0 commit comments

Comments
 (0)