deb-mock/.forgejo/workflows/build.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

66 lines
No EOL
1.7 KiB
YAML

name: Build Deb-Mock Package
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
build:
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: Run tests
run: |
source venv/bin/activate
python -m pytest tests/ -v --cov=deb_mock --cov-report=xml
- name: Build package
run: |
source venv/bin/activate
python setup.py sdist bdist_wheel
- name: List artifacts
run: |
echo "Build artifacts created:"
ls -la dist/
echo "Coverage report:"
ls -la coverage.xml