-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (59 loc) · 2.02 KB
/
example.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Check Example
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
check_docker_build:
runs-on: ubuntu-latest
name: Check Docker Build
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Build
uses: docker/build-push-action@v6
with:
context: ./example/multiple_package/server
push: false
cache-from: type=gha
cache-to: type=gha,mode=max
tags: test
load: true
- name: Run
run: |
docker run -d -p 5001:5001 test # RPC Server
go run example/multiple_package/main.go & # Reflection Server
echo -e "example.multiple_package.protos.one.GiroService\nexample.multiple_package.protos.two.BqvService\ngrpc.health.v1.Health\ngrpc.reflection.v1.ServerReflection\ngrpc.reflection.v1alpha.ServerReflection\nrerost.giro.v1.HostService" > ls_expect.txt
go run cmd/giro/main.go ls > ls_result.txt
diff ls_result.txt ls_expect.txt
echo "{\"message\":\"test\"}" > call_expect.txt
go run cmd/giro/main.go call --rpc-server=localhost:5001 example.multiple_package.protos.one.GiroService/GiroTest1 '{"message": "test"}' > call_result.txt
diff call_result.txt call_expect.txt
check_make_protoc:
runs-on: ubuntu-latest
name: Check `make protoc`
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: "27.x"
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- uses: ruby/setup-ruby@v1
with:
working-directory: example/multiple_package/
- name: Install grpc_tools_ruby_protoc
run: gem install grpc-tools
- name: Check
run: cd example/multiple_package/ && make protoc && git diff --exit-code