Ftr: supports interface exposure mode #390
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
# This is a basic workflow to help you get started with Actions | |
name: CI | |
on: | |
push: | |
branches: ["*"] | |
pull_request: | |
branches: | |
- '*' | |
- 'refact/*' | |
jobs: | |
check: | |
name: check dubbo-rust project | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: "-D warnings" | |
steps: | |
- uses: actions/checkout@main | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
default: true | |
- name: Set up cargo cache | |
uses: actions/cache@v3 | |
continue-on-error: false | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-cargo- | |
- name: setup protoc | |
run: | | |
mkdir $HOME/protoc/ -p && | |
cd $HOME/protoc/ && | |
curl --location --silent --output /tmp/protoc-21.9-linux-x86_64.zip \ | |
https://github.com/protocolbuffers/protobuf/releases/download/v21.9/protoc-21.9-linux-x86_64.zip && | |
unzip /tmp/protoc-21.9-linux-x86_64.zip && | |
echo "$HOME/protoc/bin" >> $GITHUB_PATH | |
shell: bash | |
- run: rustup component add rustfmt | |
- run: cargo fmt --all -- --check | |
- run: cargo check | |
example-greeter: | |
name: example/greeter | |
runs-on: ubuntu-latest | |
services: | |
zoo1: | |
image: zookeeper:3.8 | |
ports: | |
- 2181:2181 | |
env: | |
ZOO_MY_ID: 1 | |
nacos: | |
image: nacos/nacos-server:v2.3.1 | |
ports: | |
- 8848:8848 | |
- 9848:9848 | |
env: | |
MODE: standalone | |
steps: | |
- uses: actions/checkout@main | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Set up cargo cache | |
uses: actions/cache@v3 | |
continue-on-error: false | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-cargo- | |
- name: setup protoc | |
run: | | |
mkdir $HOME/protoc/ -p && | |
cd $HOME/protoc/ && | |
curl --location --silent --output /tmp/protoc-21.9-linux-x86_64.zip \ | |
https://github.com/protocolbuffers/protobuf/releases/download/v21.9/protoc-21.9-linux-x86_64.zip && | |
unzip /tmp/protoc-21.9-linux-x86_64.zip && | |
echo "$HOME/protoc/bin" >> $GITHUB_PATH | |
shell: bash | |
- run: cargo build | |
working-directory: examples/greeter | |
- name: example greeter | |
run: | | |
../../target/debug/greeter-server & | |
sleep 3 | |
../../target/debug/greeter-client | |
env: | |
ZOOKEEPER_SERVERS: 127.0.0.1:2181 | |
DUBBO_CONFIG_PATH: ./application.yaml | |
working-directory: examples/greeter |