Skip to content

Commit

Permalink
switch to nightly for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thatstoasty committed Apr 24, 2024
1 parent 10a767f commit 08f6ece
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 17 additions & 0 deletions run_examples.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 08f6ece

Please sign in to comment.