Skip to content

[doc] Add enhancement plan for Decimal128 type #283

[doc] Add enhancement plan for Decimal128 type

[doc] Add enhancement plan for Decimal128 type #283

Workflow file for this run

name: CI
on:
push:
branches: [main, dev]
pull_request:
workflow_dispatch:
permissions:
contents: read
pull-requests: read
defaults:
run:
shell: bash
# Shared setup repeated per job (GitHub Actions has no job-level includes,
# so we keep each job self-contained for clarity and parallelism).
jobs:
# ── Test: BigDecimal ─────────────────────────────────────────────────────────
test-bigdecimal:
name: Test BigDecimal
runs-on: ubuntu-22.04
timeout-minutes: 30
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v4
- name: Install pixi
run: curl -fsSL https://pixi.sh/install.sh | sh
- name: Add pixi to PATH
run: |
echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: pixi install
run: pixi install
- name: Build packages
run: |
pixi run mojo package src/decimo && cp decimo.mojopkg tests/
- name: Run tests
run: bash ./tests/test_bigdecimal.sh
# ── Test: BigInt ─────────────────────────────────────────────────────────────
test-bigint:
name: Test BigInt
runs-on: ubuntu-22.04
timeout-minutes: 30
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v4
- name: Install pixi
run: curl -fsSL https://pixi.sh/install.sh | sh
- name: Add pixi to PATH
run: |
echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: pixi install
run: pixi install
- name: Build packages
run: |
pixi run mojo package src/decimo && cp decimo.mojopkg tests/
- name: Run tests
run: bash ./tests/test_bigint.sh
# ── Test: BigUint ────────────────────────────────────────────────────────────
test-biguint:
name: Test BigUint
runs-on: ubuntu-22.04
timeout-minutes: 30
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v4
- name: Install pixi
run: curl -fsSL https://pixi.sh/install.sh | sh
- name: Add pixi to PATH
run: |
echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: pixi install
run: pixi install
- name: Build packages
run: |
pixi run mojo package src/decimo && cp decimo.mojopkg tests/
- name: Run tests
run: bash ./tests/test_biguint.sh
# ── Test: BigInt10 ───────────────────────────────────────────────────────────
test-bigint10:
name: Test BigInt10
runs-on: ubuntu-22.04
timeout-minutes: 30
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v4
- name: Install pixi
run: curl -fsSL https://pixi.sh/install.sh | sh
- name: Add pixi to PATH
run: |
echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: pixi install
run: pixi install
- name: Build packages
run: |
pixi run mojo package src/decimo && cp decimo.mojopkg tests/
- name: Run tests
run: bash ./tests/test_bigint10.sh
# ── Test: Decimal128 ─────────────────────────────────────────────────────────
test-decimal128:
name: Test Decimal128
runs-on: ubuntu-22.04
timeout-minutes: 30
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v4
- name: Install pixi
run: curl -fsSL https://pixi.sh/install.sh | sh
- name: Add pixi to PATH
run: |
echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: pixi install
run: pixi install
- name: Build packages
run: |
pixi run mojo package src/decimo && cp decimo.mojopkg tests/
- name: Run tests
run: bash ./tests/test_decimal128.sh
# ── Test: BigFloat ─────────────────────────────────────────────────────────
test-bigfloat:
name: Test BigFloat
runs-on: ubuntu-22.04
timeout-minutes: 30
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v4
- name: Install pixi
run: curl -fsSL https://pixi.sh/install.sh | sh
- name: Add pixi to PATH
run: |
echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: pixi install
run: pixi install
- name: Install MPFR
run: sudo apt-get update && sudo apt-get install -y libmpfr-dev
- name: Build packages
run: |
pixi run mojo package src/decimo && cp decimo.mojopkg tests/
- name: Run tests
run: bash ./tests/test_bigfloat.sh
# ── Test: TOML parser ─────────────────────────────────────────────────────
test-toml:
name: Test TOML parser
runs-on: ubuntu-22.04
timeout-minutes: 15
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v4
- name: Install pixi
run: curl -fsSL https://pixi.sh/install.sh | sh
- name: Add pixi to PATH
run: |
echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: pixi install
run: pixi install
- name: Build packages
run: |
pixi run mojo package src/decimo && cp decimo.mojopkg tests/
- name: Run tests
run: bash ./tests/test_toml.sh
# ── Test: CLI ────────────────────────────────────────────────────────────────
test-cli:
name: Test CLI
runs-on: ubuntu-22.04
timeout-minutes: 15
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v4
- name: Install pixi
run: curl -fsSL https://pixi.sh/install.sh | sh
- name: Add pixi to PATH
run: |
echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: pixi install
run: pixi install
- name: Build CLI binary
run: pixi run buildcli
- name: Run tests
run: bash ./tests/test_cli.sh
# ── Test: Python bindings ────────────────────────────────────────────────────
test-python:
name: Test Python bindings
runs-on: ubuntu-22.04
timeout-minutes: 15
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v4
- name: Install pixi
run: curl -fsSL https://pixi.sh/install.sh | sh
- name: Add pixi to PATH
run: |
echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: pixi install
run: pixi install
- name: Build & run Python tests
run: pixi run testpy
# ── Doc generation check ──────────────────────────────────────────────────────
doc-check:
name: Doc generation
runs-on: ubuntu-22.04
timeout-minutes: 10
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v4
- name: Install pixi
run: curl -fsSL https://pixi.sh/install.sh | sh
- name: Add pixi to PATH
run: |
echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: pixi install
run: pixi install
- name: Generate docs
run: pixi run doc
# ── Format check ─────────────────────────────────────────────────────────────
format-check:
name: Format check
runs-on: ubuntu-22.04
timeout-minutes: 10
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v4
- name: Install pixi
run: curl -fsSL https://pixi.sh/install.sh | sh
- name: Add pixi to PATH
run: |
echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: pixi install
run: pixi install
- name: Install pre-commit
run: pip install pre-commit
- name: Run format check
run: pre-commit run --all-files