-
Notifications
You must be signed in to change notification settings - Fork 39
Cleanup III #603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Cleanup III #603
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
c8d8c42
Spacing
RickiJay-WMDE e541ad8
Volumes
RickiJay-WMDE aeda767
Results
RickiJay-WMDE ae46cd1
Merge branch 'main' into cleanup-III
RickiJay-WMDE e8ade40
Black
RickiJay-WMDE d807ce5
Results
RickiJay-WMDE 7f1f95d
Simpler
RickiJay-WMDE a436ab7
Dedupe
RickiJay-WMDE b67eaed
Less Smelly
RickiJay-WMDE 579e042
Simpler
RickiJay-WMDE bb1a5d1
Merge branch 'main' into cleanup-III
RickiJay-WMDE 294f615
MD
RickiJay-WMDE ce206bf
Results
RickiJay-WMDE f17da92
Cleanup
RickiJay-WMDE f0c3cf1
"proseWrap": "never"
RickiJay-WMDE 096233c
Dedupe
RickiJay-WMDE d360430
Simplify
RickiJay-WMDE 9ddd8f7
Lint Javascript
RickiJay-WMDE 7fbc51b
Simplify
RickiJay-WMDE 5087c43
Clarity
RickiJay-WMDE 5205944
md
RickiJay-WMDE c54b94b
Multiple
RickiJay-WMDE c8b4856
Consistent Rules
RickiJay-WMDE a84b6d1
rename read-file-encoding
RickiJay-WMDE 9cd7a43
rename check-if-up
RickiJay-WMDE 2103bb2
rename load-env-files
RickiJay-WMDE efb8cc8
rename test-env
RickiJay-WMDE 441b692
File Exists
RickiJay-WMDE 36245aa
rename make-test-settings
RickiJay-WMDE a19a5c4
Rename Specs
RickiJay-WMDE ba5b56d
isfile
RickiJay-WMDE a0587aa
rename test-settings
RickiJay-WMDE 1819b3b
Imminent Deprecation
RickiJay-WMDE 1f5ebe4
II
RickiJay-WMDE 8a961da
Fix
RickiJay-WMDE 42e3de7
Backwards
RickiJay-WMDE 0e08045
Not Undefined
RickiJay-WMDE c30d486
Single-Use Variables
RickiJay-WMDE ada778b
toEqual
RickiJay-WMDE 77195cf
includes
RickiJay-WMDE 2c17d78
stringMatching
RickiJay-WMDE ed27361
Commented
RickiJay-WMDE 71fb157
Include
RickiJay-WMDE e9c22b3
page
RickiJay-WMDE ee2c2e6
Organize
RickiJay-WMDE 2463de2
Deprecated
RickiJay-WMDE 4f33669
toMatch
RickiJay-WMDE fe218fe
Merge branch 'main' into cleanup-III
RickiJay-WMDE 45f3236
package.json
RickiJay-WMDE 9bbfb85
Results
RickiJay-WMDE 3364fc0
style: indention
rti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,49 +1,53 @@ | ||
const fs = require( 'fs' ) | ||
const { extractModuleLineAndColumn } = require('mocha-json-streamier-reporter/lib/parse-stack-trace') | ||
var core = require('@actions/core'); | ||
var { issueCommand } = require('@actions/core/lib/command'); | ||
const fs = require( 'fs' ); | ||
const { | ||
extractModuleLineAndColumn | ||
} = require( 'mocha-json-streamier-reporter/lib/parse-stack-trace' ); | ||
const core = require( '@actions/core' ); | ||
const { issueCommand } = require( '@actions/core/lib/command' ); | ||
|
||
const suiteName = process.argv[2]; | ||
const suiteName = process.argv[ 2 ]; | ||
|
||
if( suiteName ) { | ||
return; | ||
if ( suiteName ) { | ||
return; | ||
} | ||
|
||
const filePath = `../../test/suites/${suiteName}/results/result.json`; | ||
|
||
var resultObject = {}; | ||
|
||
if (fs.existsSync(filePath)) { | ||
resultObject = JSON.parse(fs.readFileSync(filePath, 'utf8'))[suiteName]; | ||
|
||
if (resultObject.fail.length != 0) { | ||
|
||
resultObject.fail.forEach(test => { | ||
const error = extractModuleLineAndColumn(test.error.stack); | ||
let filePath = ''; | ||
if( error.file ) { | ||
filePath = error.file.replace('/usr/src/app/', 'test/'); | ||
} | ||
const message = test.fullTitle + ": " + test.error.message; | ||
|
||
issueCommand('error', { | ||
file: filePath, | ||
line: error.line, | ||
col: error.column | ||
}, message); | ||
}); | ||
|
||
} else { | ||
resultObject.pass.forEach(test => { | ||
core.info( 'OK: ' + test.fullTitle ); | ||
}); | ||
|
||
resultObject.skip.forEach(test => { | ||
core.warning( 'SKIP: ' + test.fullTitle ); | ||
}); | ||
|
||
core.info('\u001b[1mAll good 👍') | ||
} | ||
const filePath = `../../test/suites/${ suiteName }/results/result.json`; | ||
|
||
let resultObject = {}; | ||
|
||
if ( fs.existsSync( filePath ) ) { | ||
resultObject = JSON.parse( fs.readFileSync( filePath, 'utf8' ) )[ suiteName ]; | ||
|
||
if ( resultObject.fail.length != 0 ) { | ||
resultObject.fail.forEach( ( test ) => { | ||
const error = extractModuleLineAndColumn( test.error.stack ); | ||
let filePath = ''; | ||
if ( error.file ) { | ||
filePath = error.file.replace( '/usr/src/app/', 'test/' ); | ||
} | ||
const message = test.fullTitle + ': ' + test.error.message; | ||
|
||
issueCommand( | ||
'error', | ||
{ | ||
file: filePath, | ||
line: error.line, | ||
col: error.column | ||
}, | ||
message | ||
); | ||
} ); | ||
} else { | ||
resultObject.pass.forEach( ( test ) => { | ||
core.info( 'OK: ' + test.fullTitle ); | ||
} ); | ||
|
||
resultObject.skip.forEach( ( test ) => { | ||
core.warning( 'SKIP: ' + test.fullTitle ); | ||
} ); | ||
|
||
core.info( '\u001b[1mAll good 👍' ); | ||
} | ||
} else { | ||
core.error('No tests executed!'); | ||
core.error( 'No tests executed!' ); | ||
} |
This file contains hidden or 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 hidden or 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 |
---|---|---|
|
@@ -3,7 +3,7 @@ name: 🧪 Build and Test main | |
on: | ||
push: | ||
branches: | ||
- "main" | ||
- main | ||
|
||
jobs: | ||
_: | ||
|
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.