diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5bd18b9..af4bd37 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,13 +13,12 @@ jobs: run: | curl https://get.modular.com | MODULAR_AUTH=${{ secrets.MODULAR_AUTH }} sh - modular auth ${{ secrets.MODULAR_AUTH }} - # modular install --install-version 24.1.0 mojo - # TODO: fix version pinning of mojo https://github.com/modularml/mojo/issues/1887 - modular install mojo + modular install nightly/mojo pip install pytest pip install git+https://github.com/guidorice/mojo-pytest.git - name: Unit Tests run: | export MODULAR_HOME="/home/runner/.modular" - export PATH="/home/runner/.modular/pkg/packages.modular.com_mojo/bin:$PATH" + export PATH="/home/runner/.modular/pkg/packages.modular.com_nightly_mojo/bin:$PATH" pytest + bash run_examples.sh diff --git a/run_examples.sh b/run_examples.sh new file mode 100644 index 0000000..0f2c96e --- /dev/null +++ b/run_examples.sh @@ -0,0 +1,17 @@ +#!/bin/bash +mkdir ./temp +mojo package mog -I ./external -o ./temp/mog.mojopkg + +echo -e "Building binaries for all examples...\n" +mojo build examples/readme/basic.mojo -o temp/basic +mojo build examples/readme/layout.mojo -o temp/layout +mojo build examples/table/ansi.mojo -o temp/ansi + +echo -e "Executing examples...\n" +cd temp +./basic +./layout +./ansi + +cd .. +rm -R ./temp