Skip to content

Commit 7b3efca

Browse files
authored
Merge pull request #30 from cortex-lab/dev
Dev
2 parents e5e7439 + 2bc25a5 commit 7b3efca

File tree

10 files changed

+1000
-80
lines changed

10 files changed

+1000
-80
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea/*
2+
.DS_Store
3+
node_modules/*

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
# Changelog
22

3-
## [Latest](https://github.com/cortex-lab/matlab-ci/commits/master) [2.1.0]
3+
## [Latest](https://github.com/cortex-lab/matlab-ci/commits/master) [2.2.0]
44

5+
### Modified
6+
7+
- test log formatted in html
8+
- coverage checks ignored for branches named 'documentation'
9+
- switch from Serveo to localtunnel
10+
- increased timeout from 5 to 8 minutes
11+
- generalized some variables such as repo owner, ci context
12+
- updated documentation
13+
14+
## [2.1.0]
515
### Added
616

717
- coverage increase check on pull request events
@@ -13,7 +23,11 @@
1323
- suppress warnings about shadowing builtins in runAllTests
1424
- run tests in subfolders
1525
- filter out performance tests
26+
<<<<<<< HEAD
27+
- skip tests for commits to branches named 'documentation'
28+
=======
1629
- skip checks for commits to branches named 'documentation'
30+
>>>>>>> master
1731
1832
## [2.0.0]
1933
### Added

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Requires MATLAB 2017a or later, Node.js and Git Bash. The following Node.js mod
1212

1313
```
1414
npm install --save express dotenv @octokit/app @octokit/request ...
15-
github-webhook-handler xml2js
15+
github-webhook-handler xml2js localtunnel
1616
```
1717

1818
### Installing
@@ -32,7 +32,11 @@ GITHUB_PRIVATE_KEY=path\to\private-key.pem
3232
GITHUB_APP_IDENTIFIER=1234
3333
GITHUB_WEBHOOK_SECRET=
3434
WEBHOOK_PROXY_URL=
35-
RIGBOX_REPO_PATH=C:\Path\To\Code\Repo
35+
REPO_PATH=C:\Path\To\Code\Repo
36+
REPO_NAME=
37+
REPO_OWNER=
38+
TUNNEL_HOST=
39+
TUNNEL_SUBDOMAIN=
3640
```
3741

3842
To run at startup create a batch file with the following command:
@@ -45,8 +49,8 @@ Create a shortcut in your startup folder ([Windows-logo] + [R] in Windows-10 and
4549

4650
## Built With
4751

48-
* [Serveo](https://serveo.net) - SSH tunneling service
49-
* [Shields.io](https://shields.io) - Display shields
52+
* [LocalTunnel](https://localtunnel.me) - A secure tunneling service
53+
* [Shields.io](shields.io) - Display shields
5054

5155
## Contributing
5256

config.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"timeout": 480000,
3+
"program": "matlab"
4+
}

coverage.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var timestamp;
2828
var token = process.env.COVERALLS_TOKEN;
2929

3030
/**
31-
* Formates list of classes from XML file and return object formatted for the Coveralls API.
31+
* Formats list of classes from XML file and return object formatted for the Coveralls API.
3232
* @see {@link https://docs.coveralls.io/api-reference|Coveralls API docs}
3333
* @param {Array} classList - An array of class objects from the loaded XML file.
3434
* @param {String} path - The root path of the code repository.
@@ -41,7 +41,7 @@ var token = process.env.COVERALLS_TOKEN;
4141
const formatCoverage = function(classList, path, sha) {
4242
var job = {};
4343
var sourceFiles = [];
44-
typeof path != "undefined" ? 'C:\\Users\\User\\' : path; // default FIXME
44+
path = typeof path != "undefined" ? process.env.HOMEPATH : path; // default to home dir
4545
// For each class, create file object containing array of lines covered and add to sourceFile array
4646
classList.forEach( async c => {
4747
let file = {}; // Initialize file object
@@ -59,7 +59,7 @@ const formatCoverage = function(classList, path, sha) {
5959
});
6060

6161
job.repo_token = token; // env secret token?
62-
job.service_name = 'continuous-integration/ZTEST';
62+
job.service_name = `continuous-integration/${process.env.USERDOMAIN}`;
6363
// The associated pull request ID of the build. Used for updating the status and/or commenting.
6464
job.service_pull_request = '';
6565
job.source_files = sourceFiles;
@@ -102,7 +102,7 @@ const coverage = function(path, repo, sha, callback) {
102102
if (e.$.filename.startsWith('signals\\')) {modules.signals.push(e); return false;}
103103
if (e.$.filename.startsWith('npy-matlab\\')) {modules['npy-matlab'].push(e); return false;}
104104
if (e.$.filename.startsWith('wheelAnalysis\\')) {modules.wheelAnalysis.push(e); return false;}
105-
else {return true};
105+
else {return true}
106106
});
107107
formatCoverage(modules[repo.toLowerCase()], rigboxPath, callback);
108108
});
@@ -123,4 +123,4 @@ md5 = function(path) {
123123
};
124124

125125
// Export Coverage
126-
module.exports = coverage;
126+
module.exports = coverage;

0 commit comments

Comments
 (0)