Skip to content

Commit cbc81f3

Browse files
committed
update test CI action
1 parent 78b192c commit cbc81f3

File tree

1 file changed

+28
-24
lines changed

1 file changed

+28
-24
lines changed

.github/workflows/run_tests.yml

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,48 @@ on:
99
pull_request:
1010
branches: '*'
1111

12-
env:
13-
OCTFLAGS: --no-gui --no-window-system --silent
14-
1512
jobs:
1613
build:
1714

1815
runs-on: ubuntu-20.04
1916

2017
steps:
2118

22-
- name: Install dependencies
23-
run: |
24-
sudo apt-get -y -qq update
25-
sudo apt-get -y install octave liboctave-dev
26-
2719
- name: Clone spm_2_bids
2820
uses: actions/checkout@v2
2921
with:
3022
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
3924

40-
- name: get bids-matlab and set up paths
25+
- name: get bids-matlab
4126
run: |
4227
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+
5054

5155

5256

0 commit comments

Comments
 (0)