- Modul Consumable Item: model master, buku besar transaksi (stock ledger), purchase unit conversion, stock opname, dan transaction reversal - Integrasi ke Employee Management, Asset Unit, dan tiket/work order - Konfigurasi akses jaringan lokal (LAN) via 0.0.0.0:8000, ALLOWED_HOSTS, dan CSRF_TRUSTED_ORIGINS otomatis - Script pembuka firewall Windows (buka_firewall_lan.bat) dan menu interaktif run.bat - Skema migrasi 0019_consumableitem_consumabletransaction - Seeder 11 item consumable riil (seed_consumables.py) - Test suite komprehensif (41 automated tests, 100% lulus) - Pipeline CI/CD GitHub Actions (.github/workflows/ci.yml)
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: ITAM PT. KMH - CI Pipeline
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, main, develop ]
|
|
pull_request:
|
|
branches: [ master, main ]
|
|
|
|
jobs:
|
|
test:
|
|
name: Lint, Check & Run Test Suite
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
DJANGO_DEBUG: "True"
|
|
DJANGO_SECRET_KEY: "ci-testing-secret-key-ptkmh-asset-management"
|
|
ALLOWED_HOSTS: "localhost,127.0.0.1,testserver"
|
|
DB_ENGINE: "sqlite"
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
cache: 'pip'
|
|
|
|
- name: Install System Dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libjpeg-dev zlib1g-dev libfreetype6-dev
|
|
|
|
- name: Install Python Dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: Run Django System Check
|
|
run: |
|
|
python manage.py check
|
|
|
|
- name: Run Django Database Migrations
|
|
run: |
|
|
python manage.py migrate
|
|
|
|
- name: Execute Automated Test Suite (assets)
|
|
run: |
|
|
python manage.py test assets --verbosity=2
|