|
9 | 9 | pull_request: |
10 | 10 | branches: '*' |
11 | 11 |
|
12 | | -env: |
13 | | - OCTFLAGS: --no-gui --no-window-system --silent |
14 | | - |
15 | 12 | jobs: |
16 | 13 | build: |
17 | 14 |
|
18 | 15 | runs-on: ubuntu-20.04 |
19 | 16 |
|
20 | 17 | steps: |
21 | 18 |
|
22 | | - - name: Install dependencies |
23 | | - run: | |
24 | | - sudo apt-get -y -qq update |
25 | | - sudo apt-get -y install octave liboctave-dev |
26 | | -
|
27 | 19 | - name: Clone spm_2_bids |
28 | 20 | uses: actions/checkout@v2 |
29 | 21 | with: |
30 | 22 | submodules: true |
31 | | - fetch-depth: 2 |
32 | | - |
33 | | - - name: Install Moxunit and MOcov |
34 | | - run: | |
35 | | - git clone https://github.com/MOxUnit/MOxUnit.git --depth 1 |
36 | | - make -C MOxUnit install |
37 | | - git clone https://github.com/MOcov/MOcov.git --depth 1 |
38 | | - make -C MOcov install |
| 23 | + fetch-depth: 2 |
39 | 24 |
|
40 | | - - name: get bids-matlab and set up paths |
| 25 | + - name: get bids-matlab |
41 | 26 | run: | |
42 | 27 | make install_dev |
43 | | - octave $OCTFLAGS --eval "init_spm_2_bids; savepath();" |
44 | | - |
45 | | - - name: Run tests |
46 | | - run: | |
47 | | - octave $OCTFLAGS --eval "run_tests" |
48 | | - cat test_report.log | grep 0 |
49 | | - bash <(curl -s https://codecov.io/bash) |
| 28 | +
|
| 29 | + - name: MOxUnit Action |
| 30 | + uses: joergbrech/moxunit-action@master |
| 31 | + with: |
| 32 | + tests: tests # files or directories containing the MOxUnit test cases |
| 33 | + src: src lib # directories to be added to the Octave search path before running the tests. |
| 34 | + ext: tests/utils # External resources to add to the search put (excluded from coverage) |
| 35 | + # data: # Directory for test data |
| 36 | + with_coverage: true |
| 37 | + cover_xml_file: coverage.xml |
| 38 | + |
| 39 | + - name: Upload coverage |
| 40 | + uses: actions/upload-artifact@v1 |
| 41 | + with: |
| 42 | + name: coverage_file |
| 43 | + path: coverage.xml |
| 44 | + |
| 45 | + - name: Code coverage |
| 46 | + uses: codecov/codecov-action@v1 |
| 47 | + with: |
| 48 | + file: coverage.xml # optional |
| 49 | + flags: unittests # optional |
| 50 | + name: codecov-umbrella # optional |
| 51 | + fail_ci_if_error: true # optional (default = false) |
| 52 | + |
| 53 | + |
50 | 54 |
|
51 | 55 |
|
52 | 56 |
|
0 commit comments