-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (40 loc) · 1.26 KB
/
test.yaml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Run Tests
on:
pull_request:
types: [opened, reopened, edited]
push:
branches:
- 'main'
jobs:
tests:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: "Setup conda env (base)"
uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.11
auto-activate-base: true
- name: "Install mojo"
run: |
curl https://get.modular.com | MODULAR_AUTH=${{ secrets.MODULAR_AUTH }} sh -
modular auth ${{ secrets.MODULAR_AUTH }}
modular install mojo
- name: "Setup conda env (modcon23-contest)"
uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.11
activate-environment: modcon23-contest
environment-file: environment.yml
- name: "Run mojo-pytest"
run: |
export MODULAR_HOME="/home/runner/.modular"
export PATH="/home/runner/.modular/pkg/packages.modular.com_mojo/bin:$PATH"
export MOJO_PYTHON_LIBRARY="$(find $CONDA_PREFIX/lib -iname 'libpython*.[s,d]*' | sort -r | head -n 1)"
make test