-
Notifications
You must be signed in to change notification settings - Fork 36
31 lines (27 loc) · 1.02 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Run Tests
on: [pull_request, push]
env:
PACKAGE_NAME: morrow.mojopkg
MORROW_SRC: morrow
jobs:
test:
runs-on: ubuntu-22.04
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Install dependencies
run: |
curl https://get.modular.com | MODULAR_AUTH=${{ secrets.MODULAR_AUTH }} sh -
modular auth ${{ secrets.MODULAR_AUTH }}
python3 -m venv ~/max-venv && source ~/max-venv/bin/activate
modular install max
MAX_PATH=$(modular config max.path) \
&& python3 -m pip install --find-links $MAX_PATH/wheels max-engine
- name: Test
run: |
MAX_PATH=$(modular config max.path) \
&& BASHRC=$( [ -f "$HOME/.bash_profile" ] && echo "$HOME/.bash_profile" || echo "$HOME/.bashrc" ) \
&& echo 'export MODULAR_HOME="'$HOME'/.modular"' >> "$BASHRC" \
&& echo 'export PATH="'$MAX_PATH'/bin:$PATH"' >> "$BASHRC" \
&& source "$BASHRC"
mojo run test.mojo