Skip to content

[core] Enable custom usage line #130

[core] Enable custom usage line

[core] Enable custom usage line #130

Workflow file for this run

name: ArgMojo Unit Tests
on:
push:
branches: [main, dev]
pull_request:
workflow_dispatch:
permissions:
contents: read
pull-requests: read
jobs:
testing-argmojo:
name: Test with ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-22.04", "macos-latest"]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
defaults:
run:
shell: bash
env:
DEBIAN_FRONTEND: noninteractive
steps:
- name: Checkout repo
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 package (with retry for Mojo compiler intermittent crashes)
run: |
for attempt in 1 2 3; do
echo "=== mojo package attempt $attempt ==="
if pixi run package; then
echo "=== package succeeded on attempt $attempt ==="
break
fi
if [ "$attempt" -eq 3 ]; then
echo "=== package failed after 3 attempts ==="
exit 1
fi
echo "=== package crashed, retrying in 5s... ==="
sleep 5
done
- name: Run tests (with retry for Mojo compiler intermittent crashes)
run: |
for attempt in 1 2 3; do
echo "=== test attempt $attempt ==="
if pixi run test; then
echo "=== tests passed on attempt $attempt ==="
break
fi
if [ "$attempt" -eq 3 ]; then
echo "=== tests failed after 3 attempts ==="
exit 1
fi
echo "=== test run crashed, retrying in 5s... ==="
sleep 5
done
- name: Run example binaries in debug mode (catches developer-facing validation errors)
run: |
for attempt in 1 2 3; do
echo "=== debug attempt $attempt ==="
if pixi run debug; then
echo "=== debug passed on attempt $attempt ==="
break
fi
if [ "$attempt" -eq 3 ]; then
echo "=== debug failed after 3 attempts ==="
exit 1
fi
echo "=== debug run crashed, retrying in 5s... ==="
sleep 5
done