linera-service
: move wallet-only operations out of ClientContext
…
#4184
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: Kubernetes | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: | |
- "**" | |
paths: | |
- '.github/workflows/kubernetes.yml' | |
- 'toolchains/**' | |
- 'configuration/**' | |
- 'docker/**' | |
- 'kubernetes/**' | |
- 'linera-service/src/grpc_proxy.rs' | |
- 'linera-service/src/server.rs' | |
- 'linera-rpc/src/grpc/server.rs' | |
workflow_dispatch: | |
# This allows a subsequently queued workflow run to interrupt previous runs on pull-requests | |
concurrency: | |
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.run_id }}' | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_INCREMENTAL: 0 | |
CARGO_NET_RETRY: 10 | |
RUST_BACKTRACE: short | |
RUSTFLAGS: "-D warnings" | |
RUSTUP_MAX_RETRIES: 10 | |
LINERA_TRY_RELEASE_BINARIES: "true" | |
permissions: | |
contents: read | |
jobs: | |
kind-deployment-e2e-tests: | |
runs-on: ubuntu-latest-16-cores | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build client binary | |
run: | | |
cargo build --release --locked --bin linera --bin linera-proxy --bin linera-server --bin linera-db --features scylladb,rocksdb,kubernetes,metrics | |
strip target/release/linera | |
strip target/release/linera-proxy | |
strip target/release/linera-server | |
strip target/release/linera-db | |
- name: Setup helmfile | |
uses: mamezou-tech/[email protected] | |
- name: Run e2e tests | |
uses: nick-fields/retry@v2 | |
with: | |
# Port forwarding sometimes dies, which makes all requests timeout | |
# Which is why we need retries | |
max_attempts: 10 | |
timeout_minutes: 45 | |
command: kind get clusters | xargs -I {} kind delete cluster --name {} && cargo test --locked -p linera-service --features scylladb,kubernetes --test end_to_end_tests -- kubernetes | |
- name: Port forward Prometheus | |
run: | | |
kubectl port-forward prometheus-linera-core-kube-prometheu-prometheus-0 9090 & | |
- name: Check Proxy metric | |
# Check one random proxy metric that we expect to be logged after running the e2e tests | |
run: | | |
curl -s 'http://127.0.0.1:9090/api/v1/query?query=linera_proxy_request_latency_bucket' | jq -r '.data.result[]' | grep -q . | |
- name: Check Server metric | |
# Check one random server metric that we expect to be logged after running the e2e tests | |
run: | | |
curl -s 'http://127.0.0.1:9090/api/v1/query?query=linera_server_request_latency_bucket' | jq -r '.data.result[]' | grep -q . | |
- name: Check Scylla metric | |
# Check one random server metric that we expect to be logged after running the e2e tests | |
run: | | |
curl -s 'http://127.0.0.1:9090/api/v1/query?query=scylla_database_total_reads' | jq -r '.data.result[]' | grep -q . | |
- name: Check Scylla Manager metric | |
# Check one random server metric that we expect to be logged after running the e2e tests | |
run: | | |
curl -s 'http://127.0.0.1:9090/api/v1/query?query=scylla_manager_agent_rclone_bytes_transferred_total' | jq -r '.data.result[]' | grep -q . | |
- name: Destroy the kind clusters | |
if: always() | |
shell: bash | |
run: >- | |
kind get clusters | xargs -I {} kind delete cluster --name {} |