mirror of
https://github.com/evilsocket/opensnitch.git
synced 2025-03-04 00:24:40 +01:00
tests workflow: run on workflow updates, manually
This commit is contained in:
parent
0d46b2e42f
commit
037f00827e
1 changed files with 36 additions and 32 deletions
68
.github/workflows/go.yml
vendored
68
.github/workflows/go.yml
vendored
|
@ -3,46 +3,50 @@ on:
|
|||
push:
|
||||
paths:
|
||||
- 'daemon/*'
|
||||
- '.github/workflows/go.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'daemon/*'
|
||||
jobs:
|
||||
- '.github/workflows/go.yml'
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Go 1.15
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.15
|
||||
id: go
|
||||
|
||||
- name: Set up Go 1.15
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.15
|
||||
id: go
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
sudo apt-get install git libnetfilter-queue-dev libmnl-dev libpcap-dev protobuf-compiler
|
||||
export GOPATH=~/go
|
||||
export PATH=$PATH:$GOPATH/bin
|
||||
go get github.com/golang/protobuf/protoc-gen-go
|
||||
go install google.golang.org/protobuf/cmd/protoc-gen-go
|
||||
go get google.golang.org/grpc/cmd/protoc-gen-go-grpc
|
||||
cd proto
|
||||
make ../daemon/ui/protocol/ui.pb.go
|
||||
go get -v -t -d ./...
|
||||
if [ -f Gopkg.toml ]; then
|
||||
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
||||
dep ensure
|
||||
fi
|
||||
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
sudo apt-get install git libnetfilter-queue-dev libmnl-dev libpcap-dev protobuf-compiler
|
||||
export GOPATH=~/go
|
||||
export PATH=$PATH:$GOPATH/bin
|
||||
go get github.com/golang/protobuf/protoc-gen-go
|
||||
go install google.golang.org/protobuf/cmd/protoc-gen-go
|
||||
go get google.golang.org/grpc/cmd/protoc-gen-go-grpc
|
||||
cd proto
|
||||
make ../daemon/ui/protocol/ui.pb.go
|
||||
go get -v -t -d ./...
|
||||
if [ -f Gopkg.toml ]; then
|
||||
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
||||
dep ensure
|
||||
fi
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd daemon
|
||||
go build -v .
|
||||
- name: Test
|
||||
run: |
|
||||
cd daemon
|
||||
go test ./...
|
||||
- name: Build
|
||||
run: |
|
||||
cd daemon
|
||||
go build -v .
|
||||
- name: Test
|
||||
run: |
|
||||
cd daemon
|
||||
go test ./...
|
||||
|
|
Loading…
Add table
Reference in a new issue