deb-mock/.forgejo/workflows/test.yml
robojerk 0ba814ddad
Some checks failed
Build Deb-Mock Package / build (push) Failing after 57s
Test Deb-Mock Build / test (push) Failing after 53s
fix git clone URLs to use external Forgejo URL instead of internal Docker network
2025-08-03 22:36:54 +00:00

128 lines
No EOL
3.4 KiB
YAML

name: Test Deb-Mock Build
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
run: |
git clone https://git.raines.xyz/robojerk/deb-mock.git /tmp/deb-mock
cp -r /tmp/deb-mock/* .
cp -r /tmp/deb-mock/.* . 2>/dev/null || true
- name: Set up Python
run: |
sudo apt update
sudo apt install -y python3.12 python3.12-venv python3-pip
- name: Install system dependencies
run: |
sudo apt install -y sbuild schroot debootstrap
- name: Create deb-mock directories
run: |
sudo mkdir -p /var/lib/deb-mock/chroots /var/cache/deb-mock
sudo chown -R $USER:$USER /var/lib/deb-mock /var/cache/deb-mock
- name: Set up virtual environment
run: |
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip setuptools wheel
- name: Install dependencies
run: |
source venv/bin/activate
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Install deb-mock in development mode
run: |
source venv/bin/activate
pip install -e .
- name: Test CLI interface
run: |
source venv/bin/activate
deb-mock --help
deb-mock --version
- name: Test configuration system
run: |
source venv/bin/activate
deb-mock debug-config
deb-mock list-configs
deb-mock config
- name: Test package management commands
run: |
source venv/bin/activate
deb-mock install-deps --help
deb-mock install --help
deb-mock update --help
deb-mock remove --help
deb-mock apt --help
- name: Test advanced build options
run: |
source venv/bin/activate
deb-mock build --help
- name: Test chroot management
run: |
source venv/bin/activate
deb-mock list-chroots
deb-mock list-configs
- name: Test file operations
run: |
source venv/bin/activate
deb-mock copyin --help
deb-mock copyout --help
- name: Test shell access
run: |
source venv/bin/activate
deb-mock shell --help
- name: Test cache management
run: |
source venv/bin/activate
deb-mock cache-stats
deb-mock cleanup-caches --help
- name: Test chain building
run: |
source venv/bin/activate
deb-mock chain --help
- name: Test custom configuration
run: |
source venv/bin/activate
deb-mock -c test-config.yaml debug-config
deb-mock -c test-config.yaml config
- name: Run unit tests
run: |
source venv/bin/activate
python -m pytest tests/ -v
- name: Test package structure
run: |
source venv/bin/activate
python -c "import deb_mock; print('Deb-Mock imported successfully')"
python -c "from deb_mock.cli import main; print('CLI imported successfully')"
python -c "from deb_mock.core import DebMock; print('Core imported successfully')"
- name: Verify example package
run: |
source venv/bin/activate
ls -la examples/
cat examples/hello_1.0.dsc