Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
renanvy committed Aug 5, 2023
1 parent 6d70d8e commit 4d1487b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
4 changes: 3 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ inputs:
outputs:
result:
description: "JUnit unit tests JSON results in base64 format"
value: ${{ steps.get_junit_results.outputs.result }}

runs:
using: "composite"
Expand Down Expand Up @@ -47,7 +48,8 @@ runs:
script: ./gradlew connectedCheck

- name: Get JUnit results
run: npm install && npm start
id: get_junit_results
run: node $GITHUB_ACTION_PATH/dist/index.js
shell: bash
env:
INPUT_PR_AUTHOR_USERNAME: ${{inputs.pr_author_username}}
34 changes: 17 additions & 17 deletions src/controller/evaluator.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@ const UNAPPROVED_GRADE = 1
* @return {string}
*/
function runStepsEvaluator(pathList) {
// try {
// const pathFiles = getTestFiles(pathList)
// const testCasesList = pathFiles.map((pathFile) => {
// return buildTestCaseList(pathFile.path, pathFile.files)
// }).reduce((acc, testType) => acc.concat(testType), []);
try {
// const pathFiles = getTestFiles(pathList)
// const testCasesList = pathFiles.map((pathFile) => {
// return buildTestCaseList(pathFile.path, pathFile.files)
// }).reduce((acc, testType) => acc.concat(testType), []);

// const output = generateOuputJSON(testCasesList);
// const outputBase64 = parserJSONtoBase64(output)
// const output = generateOuputJSON(testCasesList);
// const outputBase64 = parserJSONtoBase64(output)

const json = JSON.stringify({
github_username: getGithubUsernameData(),
github_repository_name: getGithubRepositoryNameData(),
evaluations: [{grade: '1', description: 'GeniusLogic'}],
})
const json = JSON.stringify({
github_username: getGithubUsernameData(),
github_repository_name: getGithubRepositoryNameData(),
evaluations: [{grade: '1', description: 'GeniusLogic'}],
})

const outputBase64 = parserJSONtoBase64(json)
const outputBase64 = parserJSONtoBase64(json)

core.setOutput('result', outputBase64)
// } catch(error) {
// core.setFailed(`Action failed with error: ${error}`)
// }
core.setOutput('result', outputBase64)
} catch(error) {
core.setFailed(`Action failed with error: ${error}`)
}
}

/**
Expand Down

0 comments on commit 4d1487b

Please sign in to comment.