dodil/erp-method

.github/workflows/ci.yml

name: ci
# The forge runner (catthehacker/ubuntu:act-latest) has python 3.10 and no shared toolcache lock, so two jobs
# running actions/setup-python at once collide: python 3.12 comes from uv instead (the image python is externally managed: pip needs --break-system-packages).
on:
  push: { branches: [main] }
  pull_request: { branches: [main] }
  workflow_dispatch: {}
jobs:
  # check name: ci/repo
  repo:
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v4
      - run: pip install -q --break-system-packages uv && uv venv --python 3.12 -q /tmp/py && uv pip install -q --python /tmp/py/bin/python pyyaml
      - run: /tmp/py/bin/python scripts/check.py
      - run: /tmp/py/bin/python scripts/build_index.py && git diff --exit-code index.json
  # check name: ci/fresh-build
  # A customer's first hour, from the PUBLISHED artifacts: this checkout is the method; the bricks and erp-platform
  # arrive from git.dodil.io at the tags the method pins. One sale, order to payment, and the books balance.
  fresh-build:
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@v4
      - run: pip install -q --break-system-packages uv && uv venv --python 3.12 -q /tmp/py
      - run: PATH=/tmp/py/bin:$PATH python scripts/ci_fresh_build.py
# runner note: a run can wait many minutes in the forge's queue and the image pull alone took ~15 minutes the first time