name: Nightly Soak
on:
schedule:
- cron: '17 3 * * *'
workflow_dispatch:
inputs:
duration_secs:
description: 'Soak duration (seconds). Default 300 (~5 min).'
required: false
default: '300'
concurrency:
group: soak-${{ github.ref }}
cancel-in-progress: false
jobs:
soak:
runs-on: ubuntu-latest
name: Soak (${{ github.event.inputs.duration_secs || 300 }}s)
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: arduino/setup-protoc@v3
with:
version: '29.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }}
- name: Cache model
id: cache-model
uses: actions/cache@v5
with:
path: ~/.phostt/models
key: phostt-model-v3-onnx-${{ hashFiles('src/model/mod.rs') }}
- name: Download model
if: steps.cache-model.outputs.cache-hit != 'true'
run: cargo run -- download
- name: Run soak test
env:
PHOSTT_SOAK_DURATION_SECS: ${{ github.event.inputs.duration_secs || '300' }}
RUST_BACKTRACE: '1'
run: cargo test --release --test soak_test -- --ignored --nocapture --test-threads=1
- name: Run load tests
env:
RUST_BACKTRACE: '1'
run: cargo test --release --test load_test -- --ignored --test-threads=1
- name: Upload test artefacts
if: always()
uses: actions/upload-artifact@v7
with:
name: soak-logs-${{ github.run_id }}
path: |
target/release/deps/soak_test-*.log
if-no-files-found: ignore
retention-days: 14