Skip to content

Commit 419881a

Browse files
committed
add tests matlab
1 parent ee583ba commit 419881a

File tree

12 files changed

+167
-59
lines changed

12 files changed

+167
-59
lines changed

.github/dependabot.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
---
12
# Documentation
23
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
34
version: 2
45
updates:
5-
- package-ecosystem: 'github-actions'
6-
directory: '/'
7-
schedule:
8-
interval: 'monthly'
6+
- package-ecosystem: github-actions
7+
directory: /
8+
schedule:
9+
interval: monthly
910

10-
- package-ecosystem: 'gitsubmodule'
11-
directory: '/'
12-
schedule:
13-
interval: 'monthly'
11+
- package-ecosystem: gitsubmodule
12+
directory: /
13+
schedule:
14+
interval: monthly

.github/release-drafter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
template: |
23
## Release Notes
34

.github/workflows/bids_validator.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
---
12
name: BIDS validator
23

34
on:
45
push:
5-
branches: ['master', 'main', 'dev']
6+
branches: [master, main, dev]
67
pull_request:
78
branches: ['*']
89

.github/workflows/check_md_links.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
---
12
name: Check Markdown links
23

34
# checking for any dead links in markdown files
45

56
on:
67
push:
78
branches:
8-
- master
9-
- dev
9+
- master
10+
- dev
1011
pull_request:
1112
branches: ['*']
1213

.github/workflows/codespell.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: codespell
23

34
on:
@@ -15,5 +16,5 @@ jobs:
1516
codespell:
1617
runs-on: ubuntu-latest
1718
steps:
18-
- uses: actions/checkout@v3
19-
- uses: codespell-project/actions-codespell@master
19+
- uses: actions/checkout@v3
20+
- uses: codespell-project/actions-codespell@master

.github/workflows/run_tests.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
---
12
name: tests and coverage
23

34
on:
45
push:
56
branches:
6-
- master
7-
- dev
7+
- master
8+
- dev
89
pull_request:
910
branches: ['*']
1011

@@ -39,7 +40,5 @@ jobs:
3940
- name: Code coverage
4041
uses: codecov/codecov-action@v3
4142
with:
42-
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
43-
file: coverage.xml # optional
44-
flags: octave # optional
45-
fail_ci_if_error: true # optional (default = false)
43+
file: coverage.xml
44+
flags: octave
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
name: tests and coverage with matlab
3+
4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.ref }}
6+
cancel-in-progress: true
7+
8+
on:
9+
push:
10+
branches:
11+
- dev
12+
- main
13+
pull_request:
14+
branches: ['*']
15+
schedule:
16+
- cron: 1 1 1 * *
17+
18+
# Allows you to run this workflow manually from the Actions tab
19+
workflow_dispatch:
20+
21+
jobs:
22+
tests_matlab:
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
version: [R2021a, R2021b, R2022a, R2022b]
28+
os: [ubuntu-latest, macos-latest, windows-latest]
29+
30+
runs-on: ${{matrix.os}}
31+
32+
steps:
33+
- name: Install MATLAB
34+
uses: matlab-actions/[email protected]
35+
with:
36+
release: ${{matrix.version}}
37+
38+
- name: Install
39+
uses: actions/checkout@v3
40+
with:
41+
submodules: true
42+
fetch-depth: 0
43+
44+
- name: Install Moxunit and MOcov
45+
run: |
46+
git clone https://github.com/MOxUnit/MOxUnit.git --depth 1
47+
git clone https://github.com/MOcov/MOcov.git --depth 1
48+
49+
- name: Run tests
50+
uses: matlab-actions/[email protected]
51+
with:
52+
command: cd(fullfile(getenv('GITHUB_WORKSPACE'), '.github', 'workflows')); run tests_matlab;
53+
54+
- name: Code coverage
55+
uses: codecov/codecov-action@v3
56+
with:
57+
file: coverage.xml
58+
flags: ${{ matrix.os }}_matlab-${{ matrix.version }}
59+
name: codecov-umbrella
60+
fail_ci_if_error: false

.github/workflows/tests_matlab.m

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
%
2+
% (C) Copyright 2023 CPP_BIDS developers
3+
4+
root_dir = getenv('GITHUB_WORKSPACE');
5+
6+
addpath(fullfile(root_dir, 'MOcov', 'MOcov'));
7+
8+
cd(fullfile(root_dir, 'MOxUnit', 'MOxUnit'));
9+
run moxunit_set_path();
10+
11+
cd(fullfile(root_dir));
12+
13+
run run_tests();

.github/workflows/validate_cff.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: validate CITATION.cff
3+
4+
on:
5+
push:
6+
branches: ['*']
7+
paths:
8+
- CITATION.cff
9+
- .github/workflows/validate_cff.yml
10+
pull_request:
11+
branches: ['*']
12+
paths:
13+
- CITATION.cff
14+
- .github/workflows/validate_cff.yml
15+
16+
jobs:
17+
18+
validate_cff:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: Check whether the citation metadata from CITATION.cff is valid
23+
uses: citation-file-format/[email protected]
24+
with:
25+
args: --validate

.pre-commit-config.yaml

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,48 @@
1+
---
12
repos:
23

3-
- repo: local
4-
5-
hooks:
6-
7-
- id: mh_version
8-
name: mh_version
9-
entry: mh_style
10-
args: [-v]
11-
verbose: true
12-
language: python
13-
additional_dependencies: [miss_hit_core]
14-
15-
- id: mh_style
16-
name: mh_style
17-
entry: mh_style
18-
args: [--process-slx, --fix]
19-
files: ^(.*\.(m|slx))$
20-
language: python
21-
additional_dependencies: [miss_hit_core]
22-
23-
- id: mh_metric
24-
name: mh_metric
25-
entry: mh_metric
26-
args: [--ci]
27-
files: ^(.*\.(m|slx))$
28-
language: python
29-
additional_dependencies: [miss_hit_core]
30-
31-
- id: mh_lint
32-
name: mh_lint
33-
entry: mh_lint
34-
files: ^(.*\.(m|slx))$
35-
language: python
36-
additional_dependencies: [miss_hit]
4+
- repo: local
5+
6+
hooks:
7+
8+
- id: mh_style
9+
name: mh_style
10+
entry: mh_style
11+
args: [--process-slx, --fix]
12+
files: ^(.*\.(m|slx))$
13+
language: python
14+
additional_dependencies: [miss_hit_core]
15+
16+
- id: mh_metric
17+
name: mh_metric
18+
entry: mh_metric
19+
args: [--ci]
20+
files: ^(.*\.(m|slx))$
21+
language: python
22+
additional_dependencies: [miss_hit_core]
23+
24+
- id: mh_lint
25+
name: mh_lint
26+
entry: mh_lint
27+
files: ^(.*\.(m|slx))$
28+
language: python
29+
additional_dependencies: [miss_hit]
3730

3831
- repo: https://github.com/pre-commit/pre-commit-hooks
3932
rev: v4.4.0
4033
hooks:
41-
- id: trailing-whitespace
42-
- id: end-of-file-fixer
43-
- id: check-yaml
44-
- id: check-added-large-files
34+
- id: trailing-whitespace
35+
- id: end-of-file-fixer
36+
- id: check-yaml
37+
- id: check-added-large-files
38+
39+
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
40+
rev: 0.2.3
41+
hooks:
42+
- id: yamlfmt
43+
args: [--mapping, '2', --sequence, '2', --offset, '0']
44+
45+
- repo: https://github.com/codespell-project/codespell
46+
rev: v2.2.5
47+
hooks:
48+
- id: codespell

0 commit comments

Comments
 (0)