Skip to content

Commit

Permalink
Update c-cpp.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
fraxy-v authored Aug 31, 2024
1 parent 0fd14da commit fc5ad8c
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,24 @@ jobs:
with:
xml-out: coverage.xml

- run: npm install xml2json
- run: npm install xml2js

- name: Check coverage report
id: check-coverage
uses: actions/github-script@v7
with:
script: |
fs = require('fs');
let parser = require('xml2json');
var fs = require('fs');
var parseString = require('xml2js').parseString;
fs.readFile( 'coverage.xml', function(err, data) {
var json = parser.toJson(data);
console.log("to json ->", json);
});
function requestReport(callback) {
fs.readFile('./response.xml', 'utf8', function(err, data) {
if (err) return callback(err);
parseString(data, callback);
});
}
requestReport(function(err, result) {
if (err) return console.error(err);
console.log(result);
});

0 comments on commit fc5ad8c

Please sign in to comment.