Run giro on CI #58
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
go run cmd/giro/main.go ls > ls_result.txt | |
go run cmd/giro/main.go call --rpc-server=localhost:5000 example.multiple_package.protos.one.GiroService/GiroTest1 '{"message": "test"}' > call_result.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 |