-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests, Performance Improvements (#1)
- Add unit tests for algorithms - Reduce scale generation time by 60+% - Avoid recalculating chord suggestions for blocks if they have already been calculated - Improve placement of suggested notes which were not played - Find best octave based on note distance - Fix same-pitch/octave-interval notes showing up as red (i.e. extra notes to not play) on piano roll - Improve clarity of some terms, function logic
- Loading branch information
Showing
17 changed files
with
458 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Run tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
name: Tests | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- run: npm ci | ||
- run: 'npm run ci:node' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,35 @@ | ||
module.exports = function (config) { | ||
var junitOutputDir = process.env.CIRCLE_TEST_REPORTS || "target/junit" | ||
var junitOutputDir = process.env.CIRCLE_TEST_REPORTS || "target/junit" | ||
|
||
config.set({ | ||
browsers: ['ChromeHeadless'], | ||
basePath: 'target', | ||
files: ['karma-test.js'], | ||
frameworks: ['cljs-test'], | ||
plugins: [ | ||
'karma-cljs-test', | ||
'karma-chrome-launcher', | ||
'karma-junit-reporter' | ||
], | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
client: { | ||
args: ['shadow.test.karma.init'] | ||
}, | ||
config.set({ | ||
browsers: ['ChromeHeadless'], | ||
flags: [ | ||
'--no-sandbox', | ||
'--disable-web-security', | ||
'--disable-gpu', | ||
], | ||
browserDisconnectTimeout: 10000, | ||
browserDisconnectTolerance: 3, | ||
browserNoActivityTimeout: 60000, | ||
basePath: 'target', | ||
files: ['karma-test.js'], | ||
frameworks: ['cljs-test'], | ||
plugins: [ | ||
'karma-cljs-test', | ||
'karma-chrome-launcher', | ||
'karma-junit-reporter' | ||
], | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
client: { | ||
args: ['shadow.test.karma.init'] | ||
}, | ||
|
||
// the default configuration | ||
junitReporter: { | ||
outputDir: junitOutputDir + '/karma', // results will be saved as outputDir/browserName.xml | ||
outputFile: undefined, // if included, results will be saved as outputDir/browserName/outputFile | ||
suite: '' // suite will become the package name attribute in xml testsuite element | ||
} | ||
}) | ||
// the default configuration | ||
junitReporter: { | ||
outputDir: junitOutputDir + '/karma', // results will be saved as outputDir/browserName.xml | ||
outputFile: undefined, // if included, results will be saved as outputDir/browserName/outputFile | ||
suite: '' // suite will become the package name attribute in xml testsuite element | ||
} | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.