fix(pos): Preserve batch price and prevent rate fallback on customer or patient update #21
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Backend CI | |
| on: | |
| push: | |
| branches: ["**"] | |
| pull_request: | |
| branches: ["**"] | |
| permissions: | |
| contents: read | |
| jobs: | |
| backend: | |
| name: Python lint and Frappe tests | |
| runs-on: ubuntu-22.04 | |
| services: | |
| mariadb: | |
| image: mariadb:10.6 | |
| ports: | |
| - 3306:3306 | |
| env: | |
| MYSQL_USER: user | |
| MYSQL_PASSWORD: frappe | |
| MYSQL_DATABASE: test | |
| MYSQL_ROOT_PASSWORD: frappe | |
| options: >- | |
| --health-cmd="mysqladmin ping --silent" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=5 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| cache: pip | |
| - name: Install Python tooling | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -r requirements-dev.txt ruff frappe-bench | |
| echo "$HOME/.local/bin" >> "$GITHUB_PATH" | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y redis-server libmysqlclient-dev | |
| - name: Ruff syntax smoke | |
| run: python -m ruff check --select E9,F63,F7 posawesome | |
| - name: Initialize Frappe bench | |
| run: bench init --frappe-branch version-15 --python python3 frappe-bench | |
| - name: Start Frappe Redis services | |
| run: | | |
| cd frappe-bench | |
| for service in redis_cache redis_queue redis_socketio; do | |
| if [ -f "config/${service}.conf" ]; then | |
| redis-server "config/${service}.conf" --daemonize yes | |
| fi | |
| done | |
| redis-cli -p 11000 ping | |
| - name: Create test site and install POS Awesome | |
| run: | | |
| cd frappe-bench | |
| bench new-site example.com \ | |
| --mariadb-root-password frappe \ | |
| --admin-password frappe \ | |
| --no-mariadb-socket | |
| bench get-app --branch version-15 https://github.com/frappe/erpnext | |
| bench --site example.com install-app erpnext | |
| bench get-app "$GITHUB_WORKSPACE" | |
| bench --site example.com install-app posawesome | |
| - name: POS Awesome backend unit smoke | |
| run: python -m unittest discover -s posawesome/posawesome/api -p "test_offline_sync_*.py" |