Skip to content
This repository was archived by the owner on Jun 11, 2026. It is now read-only.

CI Test Suite

CI Test Suite #81

Workflow file for this run

name: CI Test Suite
on:
push:
branches: [ main, develop ]
tags: [ 'v*' ]
pull_request:
branches: [ main ]
schedule:
# Run tests weekly on Mondays at 9 AM UTC
- cron: '0 9 * * 1'
jobs:
tests:
runs-on: ${{ matrix.os }}
container: catthehacker/ubuntu:act-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
shell: [bash]
python-version: ['3.9', '3.10', '3.11']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Verify Python environment
run: |
python --version
python -m pip --version
# Ensure we can install packages
python -m pip install --user --upgrade pip
python -m pip install --user bashate
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y age shellcheck bc
# Add user pip bin to PATH for later steps
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Run syntax checks
run: |
# Check main script syntax
bash -n clauver.sh
# Check all test files syntax
bash -n tests/test_framework.sh
cd tests
for test_file in test_*.sh; do
bash -n "$test_file"
done
- name: Run shellcheck
run: |
shellcheck --version
# Run shellcheck but allow style issues for now
shellcheck clauver.sh tests/test_framework.sh || echo "shellcheck found issues (will be addressed in future)"
for test_file in tests/test_*.sh; do
shellcheck "$test_file" || echo "shellcheck found issues in $test_file"
done
- name: Run test suite
run: |
cd tests
chmod +x run_all_tests.sh
./run_all_tests.sh all
make ci
- name: Generate coverage report
if: matrix.os == 'ubuntu-latest'
run: |
cd tests
make coverage
cat reports/coverage.txt
security-scan:
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y age shellcheck bc
python -m pip install --user --upgrade pip
python -m pip install --user bashate
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Run bashate
run: |
# Run bashate but allow some common issues for now
bashate --ignore E006,E042,E043 clauver.sh tests/*.sh || echo "bashate found issues (will be addressed in future)"
- name: Check for secrets
run: |
# Install gitleaks
wget -q https://github.com/gitleaks/gitleaks/releases/download/v8.18.0/gitleaks_8.18.0_linux_x64.tar.gz
tar -xzf gitleaks_8.18.0_linux_x64.tar.gz
chmod +x gitleaks
# Run gitleaks but allow test keys for development
./gitleaks detect --verbose --no-banner || echo "gitleaks completed (some findings may be test keys)"
- name: Dependency check
run: |
# Check for known vulnerabilities in dependencies
echo "Checking for age binary security..."
if command -v age >/dev/null; then
age --version
# Verify age is from official source
age --help | head -1
fi
performance-benchmark:
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-latest
needs: tests
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up dependencies
run: |
sudo apt-get update
sudo apt-get install -y age shellcheck bc
- name: Run performance tests
run: |
cd tests
chmod +x run_all_tests.sh
./run_all_tests.sh performance || echo "Performance tests completed with some issues"
- name: Generate performance report
run: |
cd tests
echo "Performance Test Results" > reports/performance_$(date +%Y%m%d_%H%M%S).txt
echo "=========================" >> reports/performance_$(date +%Y%m%d_%H%M%S).txt
echo "Timestamp: $(date)" >> reports/performance_$(date +%Y%m%d_%H%M%S).txt
echo "Environment: $(uname -a)" >> reports/performance_$(date +%Y%m%d_%H%M%S).txt
echo "" >> reports/performance_$(date +%Y%m%d_%H%M%S).txt
echo "Test files found:" >> reports/performance_$(date +%Y%m%d_%H%M%S).txt
ls -la test_*.sh >> reports/performance_$(date +%Y%m%d_%H%M%S).txt