Skip to content

可用区内资源数量监控 #1249

可用区内资源数量监控

可用区内资源数量监控 #1249

Workflow file for this run

name: CI
on:
push:
branches: ["dev", "dev_ci", "dev_icy"]
pull_request:
branches: ["dev", "dev_ci"]
env:
CARGO_TERM_COLOR: always
redis: localhost:56810
redis_with_slave: localhost:56812
counterservice: localhost:9302
mc: localhost:9301
phantom: localhost:9303
mysql: localhost:3306
min_key: 1
max_key: 10000
socks_dir: /home/runner/work/breeze/socks
RUSTFLAGS: "-D warnings"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Mysql start and init
run: |
docker run --rm --name breeze_ci_mysql4623 -p 4623:3306 -d viciousstar/mysqlci_with_schema
docker run --rm --name breeze_ci_mysql4624 -p 4624:3306 -d viciousstar/mysqlci_with_schema
- name: Prepare Vintage_MC_Redis
run: docker run -d -v /home/runner/work/breeze:/data1/resource/breeze --net="host" --name breeze_github_ci viciousstar/breeze:githubci108
- uses: actions/checkout@v3
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build
run: cargo build
- name: Check Vintage
run: |
docker ps -a
curl http://127.0.0.1:8080/config/cloud/redis/testbreeze/redismeshtest
curl http://127.0.0.1:8080/config/v1/cache.service.testbreeze.pool.yf/all
curl http://127.0.0.1:8080/config/cloud/counterservice/testbreeze/meshtest
curl http://127.0.0.1:8080/config/cloud/phantom/testbreeze/phantomtest
curl http://127.0.0.1:8080/config/cloud/mq/testbreeze/mcqmeshtest
curl http://127.0.0.1:8080/config/cloud/kv/testbreeze/kvmeshtest
- name: Create Socks
run: |
#ps -aux|grep breeze
mkdir -p /home/runner/work/breeze/logs
mkdir -p /home/runner/work/breeze/snapshot
mkdir -p /home/runner/work/breeze/socks
touch /home/runner/work/breeze/socks/127.0.0.1:8080+config+cloud+redis+testbreeze+redismeshtest@redis:56810@rs
touch /home/runner/work/breeze/socks/127.0.0.1:8080+config+cloud+redis+testbreeze+redismeshtestm@redis:56812@rs
touch /home/runner/work/breeze/socks/127.0.0.1:8080+config+v1+cache.service.testbreeze.pool.yf+all:meshtest@mc:9301@cs
touch /home/runner/work/breeze/socks/127.0.0.1:8080+config+cloud+counterservice+testbreeze+meshtest@redis:9302@rs
touch /home/runner/work/breeze/socks/127.0.0.1:8080+config+cloud+phantom+testbreeze+phantomtest@phantom:9303@pt
touch /home/runner/work/breeze/socks/127.0.0.1:8080+config+cloud+kv+testbreeze+kvmeshtest@kv:3306@kv
ls -all /home/runner/work/breeze/snapshot
ls -all /home/runner/work/breeze/socks
ls -all /home/runner/work/breeze/logs
ls -all ./target/debug/agent
- name: Run
run: nohup ./target/debug/agent --discovery vintage://127.0.0.1:8080 --snapshot /home/runner/work/breeze/snapshot --service-path /home/runner/work/breeze/socks --log-dir /home/runner/work/breeze/logs --port 9984 --metrics-probe 8.8.8.8:53 --log-level info --idc-path 127.0.0.1:8080/3/config/breeze/idc_region --key-path=.github/workflows/private_key.pem > /home/runner/work/breeze/logs/log.file 2>&1 &
- name: Check Status
run: |
sleep 6s
netstat -nat|grep LISTEN
#ps -aux|grep breeze
ls -all /home/runner/work/breeze/snapshot
ls -all /home/runner/work/breeze/socks
ls -all /home/runner/work/breeze/logs
tail -10 /home/runner/work/breeze/logs/log.file
tail -10 /home/runner/work/breeze/logs/breeze.log
#cat /home/runner/work/breeze/logs/log.file
#cat /home/runner/work/breeze/logs/breeze.log
#- name: Run cargo-tarpaulin
# uses: actions-rs/[email protected]
# with:
# version: "0.22.0"
# args: "--features=github_workflow --features=console-api -- --test-threads 1"
- name: Run unit tests
run: cargo test -p tests
- name: Run ci tests
run: cargo test -p tests_integration --features github_workflow
- name: Output log
if: failure()
run: |
cat /home/runner/work/breeze/logs/log.file
cat /home/runner/work/breeze/logs/breeze.log