Skip to content

[mojo] Update codebase to Mojo v25.4 #109

[mojo] Update codebase to Mojo v25.4

[mojo] Update codebase to Mojo v25.4 #109

Workflow file for this run

name: DeciMojo Unit Tests
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
pull-requests: read
jobs:
testing-decimojo:
name: with ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# os: ["macos-latest"]
os: ["ubuntu-22.04"]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
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 path
run: |
echo "PIXI_HOME=$HOME/.pixi" >> $GITHUB_ENV
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: Activate virtualenv
run: |
python3 -m venv $HOME/venv/
. $HOME/venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
- name: Pixi install
run: |
pixi install
- name: Build package
run: |
pixi run mojo package src/decimojo
pixi run mojo package src/tomlmojo
cp decimojo.mojopkg tests/
cp decimojo.mojopkg benches/
mv tomlmojo.mojopkg tests/
- name: Run tests
run: |
pixi run mojo test tests
- name: Install pre-commit
run: |
pip install pre-commit
pre-commit install
- name: Run pre-commit
run: |
pixi install
pre-commit run --all-files