Skip to content

Commit

Permalink
Run giro on CI (#65)
Browse files Browse the repository at this point in the history
* Run giro on CI

* Fix

* Fix

* Fix

* Fix

* Fix port

* Cat result

* Check stdout diff

* Use -e

* Fix
  • Loading branch information
rerost authored Aug 31, 2024
1 parent 01d8897 commit 8b1ad36
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,31 @@ jobs:
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
Expand Down

0 comments on commit 8b1ad36

Please sign in to comment.