[add] Add Matrix
type (2D array)
#144
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: NuMojo Unit Tests | |
on: | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pull-requests: read | |
jobs: | |
testing-numojo: | |
name: with ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-22.04", "macos-14"] | |
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 magic | |
run: | | |
curl -ssL https://magic.modular.com/ff414efd-16ac-4bf3-8efc-50b059272ab6 | bash | |
- name: Add path | |
run: | | |
echo "MODULAR_HOME=$HOME/.modular" >> $GITHUB_ENV | |
echo "$HOME/.modular/bin" >> $GITHUB_PATH | |
echo "$HOME/.modular/pkg/packages.modular.com_mojo/bin" >> $GITHUB_PATH | |
- name: Activate virtualenv | |
run: | | |
python3 -m venv $HOME/venv/ | |
. $HOME/venv/bin/activate | |
echo PATH=$PATH >> $GITHUB_ENV | |
- name: Install packages | |
run: | | |
pip install "numpy" | |
- name: Run tests | |
run: | | |
magic install | |
magic run mojo test tests -I . |