Skip to content

Commit

Permalink
Merge pull request #195 from bci-oss/feature/fix-validation-comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bs-jokri authored Jun 7, 2023
2 parents 8a5c994 + 9270edd commit c44b4ab
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/actions/model-validation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ async function gatherValidationResults(startPath, fileEnding, returnValue) {
async function validateChanges(added, modified, prNumber) {
var validationOutput = []

added = added.filter(fileName => fileName.endsWith('.ttl'))
modified = modified.filter(fileName => fileName.endsWith('.ttl'))

await validateAllInputs(added, modified, validationOutput)

console.log(validationOutput)
Expand Down Expand Up @@ -126,20 +129,18 @@ async function validateAllInputs(added, modified, validationOutput) {

async function validateModel(file) {
return new Promise((resolve, reject) => {
if (path.extname(file) === ".ttl") {
console.log(`Validating TTL file ${file}`)
console.log(`Validating TTL file ${file}`)

exec(`java -jar ${bammSdkPath} aspect ${file} validate`, (error, stdout, stderr) => {
if (stderr) {
reject(stderr)
}
exec(`java -jar ${bammSdkPath} aspect ${file} validate`, (error, stdout, stderr) => {
if (stderr) {
reject(stderr)
}

resolve({
file: file,
response: stdout
})
resolve({
file: file,
response: stdout
})
}
})
})

}
Expand Down

0 comments on commit c44b4ab

Please sign in to comment.