Skip to content

redesign approval UI homepage into a product site #15

redesign approval UI homepage into a product site

redesign approval UI homepage into a product site #15

Workflow file for this run

# name: Nightly
# on:
# schedule:
# # Run at 2 AM UTC every day
# - cron: '0 2 * * *'
# workflow_dispatch:
# inputs:
# skip_stability:
# description: 'Skip stability tests'
# required: false
# default: 'false'
# skip_load:
# description: 'Skip load tests'
# required: false
# default: 'false'
# env:
# CARGO_TERM_COLOR: always
# RUST_BACKTRACE: 1
# jobs:
# stability-tests:
# name: Stability Tests
# runs-on: ubuntu-latest
# if: ${{ github.event.inputs.skip_stability != 'true' }}
# timeout-minutes: 120
# services:
# postgres:
# image: postgres:16
# env:
# POSTGRES_USER: agentauth
# POSTGRES_PASSWORD: agentauth
# POSTGRES_DB: agentauth_test
# ports:
# - 5432:5432
# options: >-
# --health-cmd pg_isready
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
# redis:
# image: redis:7
# ports:
# - 6379:6379
# options: >-
# --health-cmd "redis-cli ping"
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
# steps:
# - uses: actions/checkout@v4
# - name: Install Rust toolchain
# uses: dtolnay/rust-action@stable
# - name: Install nextest
# uses: taiki-e/install-action@nextest
# - name: Cache cargo registry
# uses: actions/cache@v4
# with:
# path: |
# ~/.cargo/registry
# ~/.cargo/git
# target
# key: ${{ runner.os }}-cargo-nightly-${{ hashFiles('**/Cargo.lock') }}
# - name: Run database migrations
# run: |
# cargo install sqlx-cli --no-default-features --features postgres
# sqlx migrate run
# env:
# DATABASE_URL: postgres://agentauth:agentauth@localhost:5432/agentauth_test
# - name: Run stability tests
# run: cargo nextest run --test stability -- --ignored
# env:
# DATABASE_URL: postgres://agentauth:agentauth@localhost:5432/agentauth_test
# REDIS_URL: redis://localhost:6379
# - name: Check for memory leaks
# run: |
# # Run soak test for 1 hour and compare RSS before/after
# cargo build --release -p agentauth-verifier-bin
# # Start verifier in background
# ./target/release/agentauth-verifier &
# VERIFIER_PID=$!
# sleep 10
# INITIAL_RSS=$(ps -o rss= -p $VERIFIER_PID)
# echo "Initial RSS: ${INITIAL_RSS}KB"
# # Run load for 1 hour
# sleep 3600
# FINAL_RSS=$(ps -o rss= -p $VERIFIER_PID)
# echo "Final RSS: ${FINAL_RSS}KB"
# # Check for >10% growth
# GROWTH=$(( (FINAL_RSS - INITIAL_RSS) * 100 / INITIAL_RSS ))
# echo "Memory growth: ${GROWTH}%"
# kill $VERIFIER_PID
# if [ $GROWTH -gt 10 ]; then
# echo "Memory leak detected! Growth: ${GROWTH}%"
# exit 1
# fi
# env:
# DATABASE_URL: postgres://agentauth:agentauth@localhost:5432/agentauth_test
# REDIS_URL: redis://localhost:6379
# load-tests:
# name: Load Tests
# runs-on: ubuntu-latest
# if: ${{ github.event.inputs.skip_load != 'true' }}
# timeout-minutes: 60
# services:
# postgres:
# image: postgres:16
# env:
# POSTGRES_USER: agentauth
# POSTGRES_PASSWORD: agentauth
# POSTGRES_DB: agentauth_test
# ports:
# - 5432:5432
# options: >-
# --health-cmd pg_isready
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
# redis:
# image: redis:7
# ports:
# - 6379:6379
# options: >-
# --health-cmd "redis-cli ping"
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
# steps:
# - uses: actions/checkout@v4
# - name: Install Rust toolchain
# uses: dtolnay/rust-action@stable
# - name: Install k6
# run: |
# sudo gpg -k
# sudo gpg --no-default-keyring --keyring /usr/share/keyrings/k6-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69
# echo "deb [signed-by=/usr/share/keyrings/k6-archive-keyring.gpg] https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sources.list.d/k6.list
# sudo apt-get update
# sudo apt-get install k6
# - name: Cache cargo registry
# uses: actions/cache@v4
# with:
# path: |
# ~/.cargo/registry
# ~/.cargo/git
# target
# key: ${{ runner.os }}-cargo-nightly-${{ hashFiles('**/Cargo.lock') }}
# - name: Build services
# run: cargo build --release --workspace
# - name: Run database migrations
# run: |
# cargo install sqlx-cli --no-default-features --features postgres
# sqlx migrate run
# env:
# DATABASE_URL: postgres://agentauth:agentauth@localhost:5432/agentauth_test
# - name: Start services
# run: |
# ./target/release/registry &
# ./target/release/agentauth-verifier &
# sleep 10
# env:
# DATABASE_URL: postgres://agentauth:agentauth@localhost:5432/agentauth_test
# REDIS_URL: redis://localhost:6379
# - name: Run token verification load test
# run: k6 run load-tests/token-verify.js
# env:
# K6_VUS: 100
# K6_DURATION: 10m
# - name: Run token issuance load test
# run: k6 run load-tests/token-issue.js
# env:
# K6_VUS: 50
# K6_DURATION: 5m
# - name: Run composite scenarios
# run: |
# for scenario in load-tests/scenarios/*.js; do
# echo "Running scenario: $scenario"
# k6 run "$scenario"
# done
# - name: Upload load test results
# uses: actions/upload-artifact@v4
# with:
# name: load-test-results
# path: load-test-results/
# security-scan:
# name: Security Scan
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Install Rust toolchain
# uses: dtolnay/rust-action@stable
# - name: Install security tools
# run: |
# cargo install cargo-audit
# cargo install cargo-deny
# - name: Run cargo audit
# run: cargo audit
# - name: Run cargo deny
# run: |
# cargo deny check licenses
# cargo deny check bans
# - name: Check for secrets
# uses: trufflesecurity/trufflehog@main
# with:
# path: ./
# base: ""
# extra_args: --only-verified
# notify:
# name: Notify Results
# runs-on: ubuntu-latest
# needs: [stability-tests, load-tests, security-scan]
# if: always()
# steps:
# - name: Check results
# run: |
# if [ "${{ needs.stability-tests.result }}" = "failure" ] || \
# [ "${{ needs.load-tests.result }}" = "failure" ] || \
# [ "${{ needs.security-scan.result }}" = "failure" ]; then
# echo "Nightly pipeline failed!"
# exit 1
# fi
# echo "Nightly pipeline succeeded!"