File tree Expand file tree Collapse file tree 2 files changed +57
-1
lines changed
Expand file tree Collapse file tree 2 files changed +57
-1
lines changed Original file line number Diff line number Diff line change 1+ name : DeciMojo Unit Tests
2+ on :
3+ pull_request :
4+ workflow_dispatch :
5+
6+ permissions :
7+ contents : read
8+ pull-requests : read
9+
10+ jobs :
11+ testing-decimojo :
12+ name : with ${{ matrix.os }}
13+ strategy :
14+ fail-fast : false
15+ matrix :
16+ os : ["ubuntu-22.04"]
17+
18+ runs-on : ${{ matrix.os }}
19+ timeout-minutes : 30
20+
21+ defaults :
22+ run :
23+ shell : bash
24+ env :
25+ DEBIAN_FRONTEND : noninteractive
26+
27+ steps :
28+ - name : Checkout repo
29+ uses : actions/checkout@v4
30+
31+ - name : Install magic
32+ run : |
33+ curl -ssL https://magic.modular.com/deb181c4-455c-4abe-a263-afcff49ccf67 | bash
34+
35+ - name : Add path
36+ run : |
37+ echo "MODULAR_HOME=$HOME/.modular" >> $GITHUB_ENV
38+ echo "$HOME/.modular/bin" >> $GITHUB_PATH
39+ echo "$HOME/.modular/pkg/packages.modular.com_mojo/bin" >> $GITHUB_PATH
40+
41+ - name : Activate virtualenv
42+ run : |
43+ python3 -m venv $HOME/venv/
44+ . $HOME/venv/bin/activate
45+ echo PATH=$PATH >> $GITHUB_ENV
46+
47+ - name : Run tests
48+ run : |
49+ magic install
50+ magic run mojo test tests -I .
51+
52+ - name : Run formating checks
53+ run : |
54+ magic install
55+ magic run mojo format ./
56+
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ package = "magic run format && magic run mojo package decimojo && cp decimojo.mo
1717p = " magic run package"
1818
1919# tests
20- test = " magic run package && magic run mojo tests/*.mojo && magic run mojo test tests"
20+ test = " magic run package && magic run mojo tests/*.mojo && magic run mojo test tests -I . "
2121t = " magic run test"
2222
2323# before commit
You can’t perform that action at this time.
0 commit comments