Skip to content

Commit

Permalink
Merge pull request #18 from fieldtrip/branch2
Browse files Browse the repository at this point in the history
Branch2
  • Loading branch information
robertoostenveld authored Aug 24, 2023
2 parents 63a3b48 + 854835a commit 601d541
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .github/scripts/comment_suggestion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env python

print("Hello world!")
print("And also hi there on Mars!")
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create comment
name: Suggest tests

on:
pull_request:
Expand All @@ -15,14 +15,18 @@ jobs:
- name: Check out repository
uses: actions/checkout@v3

- name: Create comment
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Find suggested tests
id: print-hello
run: |
python .github/scripts/comment_suggestion.py > ./comment
- name: Create comment with suggested tests
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.number }}
body: |
This is a multi-line test comment
- With GitHub **Markdown** :sparkles:
- Created by [create-or-update-comment][1]
[1]: https://github.com/peter-evans/create-or-update-comment
reactions: '+1'
body-path: ./comment
1 change: 0 additions & 1 deletion count/twoTest.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
function twoTest

disp('two');

2 changes: 1 addition & 1 deletion localfunctionTest.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function tests = runLocalTest
function tests = localfunctionTest
tests = functiontests(localfunctions);

function testFunctionOne(testCase)
Expand Down
5 changes: 5 additions & 0 deletions test/test_001.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

% MEM 3gb
% WALLTIME 00:10:00
% DEPENDENCY oneTest
% DATA no
5 changes: 5 additions & 0 deletions test/test_002.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

% MEM 3gb
% WALLTIME 00:10:00
% DEPENDENCY twoTest
% DATA public
5 changes: 5 additions & 0 deletions test/test_003.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

% MEM 3gb
% WALLTIME 00:10:00
% DEPENDENCY threeTest
% DATA private
2 changes: 1 addition & 1 deletion test_failure.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function test_failure

% This test script always fails
%% This test script always fails

error('Failure');

8 changes: 5 additions & 3 deletions test_success.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
function test_success
function tests = test_success
tests = functiontests(localfunctions);

% This test script always succeeds

disp('Success');
function actualTest(testCase)

%% This test script always succeeds
disp('Success');

0 comments on commit 601d541

Please sign in to comment.