Skip to content

Commit 686de78

Browse files
author
Franck Rupin
committed
Replace travis by github action
- Travis is no longer free so we can't rely on this CI anymore - This commit takes the travis rules and implement them in github action - This commit solves the internal name resolution
1 parent e0e0c78 commit 686de78

File tree

2 files changed

+65
-21
lines changed

2 files changed

+65
-21
lines changed

.github/workflows/go.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Go
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v2
18+
with:
19+
go-version: 1.17
20+
21+
- name: OVS setup
22+
run: |
23+
sudo apt install openvswitch-switch
24+
sudo ovs-vsctl add-br ovsbr0
25+
26+
- name: Check and test
27+
run: |
28+
export GOPATH=/home/runner/work
29+
export PATH=$PATH:$GOPATH/bin
30+
mkdir $GOPATH/src $GOPATH/pkg $GOPATH/bin
31+
go install honnef.co/go/tools/cmd/staticcheck@latest
32+
NEW=$GOPATH/src/github.com/digitalocean/go-openvswitch
33+
mkdir -p $NEW
34+
cp -r ./* $NEW
35+
cd $NEW
36+
go mod download
37+
go get golang.org/x/lint/golint
38+
go get honnef.co/go/tools/cmd/staticcheck
39+
go get -d ./...
40+
echo "=========START LICENSE CHECK============"
41+
./scripts/licensecheck.sh
42+
echo "=========START BUILD============"
43+
go build -v -tags=gofuzz ./...
44+
echo "=========START VET============"
45+
go vet ./...
46+
echo "=========START GO FMT CHECK============"
47+
./scripts/gofmt.sh
48+
echo "=========START GO LINT CHECK============"
49+
./scripts/golint.sh
50+
echo "=========START STATICCHECK============"
51+
staticcheck ./...
52+
echo "=========START LINT============"
53+
golint -set_exit_status ./cmd/... ./internal/...
54+
echo "=========START TESTS IN OVS============"
55+
go test -v -race ./ovs/
56+
echo "=========START TESTS IN OVSDB============"
57+
go test -v -race ./ovsdb/
58+
go test -c -race ./ovsdb
59+
echo "=========START TESTS IN OVSNL============"
60+
go test -v -race ./ovsnl/
61+
echo "=========START OVSDB.TEST============"
62+
sudo ./ovsdb.test -test.v
63+
echo "=========START SECURITY SCANNING============"
64+
go install github.com/praetorian-inc/gokart@latest
65+
gokart scan

.travis.yml

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

0 commit comments

Comments
 (0)