mirror of
https://github.com/telemt/telemt.git
synced 2026-06-19 02:00:08 +07:00
Refactor CI workflows: rename build job and streamline stress testing setup
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
name: Stress Tests
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 2 * * *'
|
||||
pull_request:
|
||||
branches: ["*"]
|
||||
paths:
|
||||
- src/proxy/**
|
||||
- src/transport/**
|
||||
- src/stream/**
|
||||
- src/protocol/**
|
||||
- src/tls_front/**
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
quota-lock-stress:
|
||||
name: Quota-lock stress loop
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install latest stable Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Cache cargo registry and build artifacts
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
key: ${{ runner.os }}-cargo-stress-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cargo-stress-
|
||||
${{ runner.os }}-cargo-
|
||||
|
||||
- name: Run quota-lock stress suites
|
||||
env:
|
||||
RUST_TEST_THREADS: 16
|
||||
run: |
|
||||
set -euo pipefail
|
||||
for i in $(seq 1 12); do
|
||||
echo "[quota-lock-stress] iteration ${i}/12"
|
||||
cargo test quota_lock_ --bin telemt -- --nocapture --test-threads 16
|
||||
cargo test relay_quota_wake --bin telemt -- --nocapture --test-threads 16
|
||||
done
|
||||
Reference in New Issue
Block a user