Skip to content

Commit 87a5a09

Browse files
committed
[DATALAD] Recorded changes
1 parent 64e7ea4 commit 87a5a09

File tree

10 files changed

+145
-119
lines changed

10 files changed

+145
-119
lines changed

.github/dependabot.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
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: 'weekly'
6+
- package-ecosystem: github-actions
7+
directory: /
8+
schedule:
9+
interval: weekly

.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
Lines changed: 41 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: "MATLAB: test and coverage"
1+
---
2+
name: 'MATLAB: test and coverage'
23

34
# Installs
45
# - MATLAB github action
@@ -11,9 +12,9 @@ name: "MATLAB: test and coverage"
1112

1213
on:
1314
push:
14-
branches: ["master", "main", "dev"]
15+
branches: [master, main, dev]
1516
pull_request:
16-
branches: ["*"]
17+
branches: ['*']
1718

1819
jobs:
1920
matlab_tests:
@@ -27,36 +28,40 @@ jobs:
2728
runs-on: ${{ matrix.os }}
2829

2930
steps:
30-
- name: Install MATLAB
31-
uses: matlab-actions/[email protected]
32-
with:
33-
release: ${{ matrix.version }}
34-
35-
- uses: actions/checkout@v3
36-
with:
37-
submodules: true
38-
fetch-depth: 1
39-
40-
- name: Install Moxunit and MOcov
41-
run: |
42-
git clone https://github.com/MOxUnit/MOxUnit.git --depth 1
43-
git clone https://github.com/MOcov/MOcov.git --depth 1
44-
45-
- name: Run tests
46-
uses: matlab-actions/[email protected]
47-
with:
48-
command:
49-
cd(fullfile(getenv('GITHUB_WORKSPACE'), '.github', 'workflows'));
50-
run run_tests_ci;
51-
52-
- name: Check logs
53-
run: |
54-
cat test_report.log | grep 0
55-
56-
- name: Code coverage
57-
uses: codecov/codecov-action@v3
58-
with:
59-
file: coverage.xml # optional
60-
flags: matlab # optional
61-
name: codecov-umbrella # optional
62-
fail_ci_if_error: true # optional (default = false)
31+
- name: Install MATLAB
32+
uses: matlab-actions/[email protected]
33+
with:
34+
release: ${{ matrix.version }}
35+
36+
- uses: actions/checkout@v3
37+
with:
38+
submodules: true
39+
fetch-depth: 1
40+
41+
- name: Install Moxunit and MOcov
42+
run: |
43+
git clone https://github.com/MOxUnit/MOxUnit.git --depth 1
44+
git clone https://github.com/MOcov/MOcov.git --depth 1
45+
46+
- name: Run tests
47+
uses: matlab-actions/[email protected]
48+
with:
49+
command: cd(fullfile(getenv('GITHUB_WORKSPACE'), '.github', 'workflows')); run run_tests_ci;
50+
51+
- name: Check logs unix
52+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
53+
run: grep -q 0 test_report.log || { echo "Some tests failed. Check the 'Run tests' step to know which ones." >&2; exit 1; }
54+
- name: Check logs windows
55+
if: matrix.os == 'windows-latest'
56+
run: |
57+
if (-not (Get-Content test_report.log | Select-String -Pattern "0")) {
58+
throw "Some tests failed. Check the 'Run tests' step to know which ones."
59+
}
60+
61+
- name: Code coverage
62+
uses: codecov/codecov-action@v3
63+
with:
64+
file: coverage.xml # optional
65+
flags: matlab # optional
66+
name: codecov-umbrella # optional
67+
fail_ci_if_error: true # optional (default = false)

.github/workflows/miss_hit.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1+
---
12
name: miss_hit
23

34
on:
45
push:
56
branches:
6-
- main
7-
- dev
7+
- main
8+
- dev
89
paths:
9-
- '**.m'
10-
- '.github/workflows/miss_hit.yml'
10+
- '**.m'
11+
- .github/workflows/miss_hit.yml
1112
pull_request:
1213
branches: ['*']
1314
paths:
14-
- '**.m'
15-
- '.github/workflows/miss_hit.yml'
15+
- '**.m'
16+
- .github/workflows/miss_hit.yml
1617
jobs:
1718

1819
miss_hit:
@@ -21,7 +22,7 @@ jobs:
2122

2223
strategy:
2324
matrix:
24-
command: ["mh_style", "mh_metric --ci && mh_lint"]
25+
command: [mh_style, mh_metric --ci && mh_lint]
2526
fail-fast: true # cancel all jobs if one fails
2627

2728
steps:
@@ -33,7 +34,7 @@ jobs:
3334
- name: Set up Python
3435
uses: actions/setup-python@v4
3536
with:
36-
python-version: 3.9
37+
python-version: '3.11'
3738

3839
- name: Install dependencies
3940
run: |
Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
1-
name: "Octave: test and coverage"
1+
---
2+
name: 'Octave: test and coverage'
23

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

910
jobs:
1011
build:
1112
runs-on: ubuntu-latest
1213

1314
steps:
14-
- uses: actions/checkout@v3
15-
with:
16-
submodules: true
17-
fetch-depth: 1
15+
- uses: actions/checkout@v3
16+
with:
17+
submodules: true
18+
fetch-depth: 1
1819

19-
- name: MOxUnit Action
20-
uses: joergbrech/[email protected]
21-
with:
22-
tests: tests
23-
src: src
24-
with_coverage: true
25-
cover_xml_file: coverage.xml
20+
- name: MOxUnit Action
21+
uses: joergbrech/[email protected]
22+
with:
23+
tests: tests
24+
src: src
25+
with_coverage: true
26+
cover_xml_file: coverage.xml
2627

27-
- name: Code coverage
28-
uses: codecov/codecov-action@v3
29-
with:
30-
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
31-
file: coverage.xml # optional
32-
flags: unittests # optional
33-
name: codecov-umbrella # optional
34-
fail_ci_if_error: true # optional (default = false)
28+
- name: Code coverage
29+
uses: codecov/codecov-action@v3
30+
with:
31+
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
32+
file: coverage.xml # optional
33+
flags: octave # optional
34+
name: codecov-umbrella # optional
35+
fail_ci_if_error: true # optional (default = false)

.github/workflows/validate_cff.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1+
---
12
name: validate CITATION.cff
23

34
on:
45
push:
56
branches: ['*']
67
paths:
7-
- 'CITATION.cff'
8-
- '.github/workflows/validate_cff.yml'
8+
- CITATION.cff
9+
- .github/workflows/validate_cff.yml
910
pull_request:
1011
branches: ['*']
1112
paths:
12-
- 'CITATION.cff'
13-
- '.github/workflows/validate_cff.yml'
13+
- CITATION.cff
14+
- .github/workflows/validate_cff.yml
1415

1516
jobs:
1617

@@ -27,7 +28,7 @@ jobs:
2728
- name: Set up Python
2829
uses: actions/setup-python@v4
2930
with:
30-
python-version: 3.9
31+
python-version: '3.11'
3132

3233
- name: Install dependencies
3334
run: |

.pre-commit-config.yaml

Lines changed: 50 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,60 @@
1+
---
12
# See https://pre-commit.com/
23
# and https://pre-commit.ci/
34
# for details
45

56
repos:
67

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

4243
- repo: https://github.com/pre-commit/pre-commit-hooks
4344
rev: v4.4.0
4445
hooks:
45-
- id: trailing-whitespace
46-
- id: end-of-file-fixer
47-
- id: check-yaml
48-
- id: check-added-large-files
46+
- id: trailing-whitespace
47+
- id: end-of-file-fixer
48+
- id: check-yaml
49+
- id: check-added-large-files
50+
51+
- repo: https://github.com/codespell-project/codespell
52+
rev: v2.2.4
53+
hooks:
54+
- id: codespell
55+
56+
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
57+
rev: 0.2.2
58+
hooks:
59+
- id: yamlfmt
60+
args: [--mapping, '2', --sequence, '2', --offset, '0']

.readthedocs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
# Read the Docs configuration file
23
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
34

@@ -12,10 +13,10 @@ sphinx:
1213

1314
# Optionally build your docs in additional formats such as PDF
1415
formats:
15-
- pdf
16+
- pdf
1617

1718
# Optionally set the version of Python and requirements required to build your docs
1819
python:
1920
version: 3.8
2021
install:
21-
- requirements: requirements.txt
22+
- requirements: requirements.txt

binder/environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
channels:
23

34
- default

run_tests.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ function run_tests()
2424
'-cover_xml_file', 'coverage.xml', ...
2525
'-cover_html_dir', fullfile(pwd, 'coverage_html'));
2626

27+
fileID = fopen('test_report.log', 'w');
2728
if success
28-
system('echo 0 > test_report.log');
29+
fprintf(fileID, '0');
2930
else
30-
system('echo 1 > test_report.log');
31+
fprintf(fileID, '1');
3132
end
33+
fclose(fileID);
3234

3335
toc;
3436

0 commit comments

Comments
 (0)