Project

General

Profile

Feature #23381

Harmonize CI scripts

Added by Marco Mambelli about 2 months ago.

Status:
New
Priority:
Normal
Category:
-
Target version:
Start date:
10/04/2019
Due date:
% Done:

0%

Estimated time:
Stakeholders:
Duration:

Description

Provide some utility function in utils.sh to harmonize the various CI script (shellcheck, run_pylint, unittest, ...).
  • invocation options should be the same
  • ability to run on current or multiple branches
  • similar return codes (script failed, warnings found, errors found, ok, ...)
  • similar output summary (table, email)

This will need to be in a separate branch and coordinated w/ Fermilab's CI

Some links about formats:

List report example

filename info warning errors
name1 1 0 2

XML report example

Pass (one test, that linting was run)
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="jest tests" tests="1" failures="0" time="0.346">
  <testsuite name="undefined" errors="0" failures="0" skipped="0" timestamp="2019-06-07T15:44:08" time="0.092" tests="1">
    <testcase classname=" OAS Linter" name=" OAS Linter" time="0.092">
    </testcase>
  </testsuite>
</testsuites>

Fail (multiple tests, one for each warning from the linter)
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="jest tests" tests="4" failures="4" time="0.39">
  <testsuite name="undefined" errors="0" failures="4" skipped="0" timestamp="2019-06-07T15:50:20" time="0.148" tests="4">
    <testcase classname=" schema-properties-type if.then test failed:undefined != object - #/components/schemas/AddressRegion/oneOf/0 (schema-properties-type)" name=" schema-properties-type if.then test failed:undefined != object - #/components/schemas/AddressRegion/oneOf/0 (schema-properties-type)" time="0.148">
      <failure>schema-properties-type if.then test failed:undefined != object</failure>
    </testcase>
    <testcase classname=" schema-properties-type if.then test failed:undefined != object - #/components/schemas/AddressRegion/oneOf/1 (schema-properties-type)" name=" schema-properties-type if.then test failed:undefined != object - #/components/schemas/AddressRegion/oneOf/1 (schema-properties-type)" time="0.148">
      <failure>schema-properties-type if.then test failed:undefined != object</failure>
    </testcase>
    <testcase classname=" schema-properties-type if.then test failed:undefined != object - #/components/schemas/AuctionListingAddress/oneOf/0 (schema-properties-type)" name=" schema-properties-type if.then test failed:undefined != object - #/components/schemas/AuctionListingAddress/oneOf/0 (schema-properties-type)" time="0.148">
      <failure>schema-properties-type if.then test failed:undefined != object</failure>
    </testcase>
    <testcase classname=" schema-properties-type if.then test failed:undefined != object - #/components/schemas/AuctionListingAddress/oneOf/1 (schema-properties-type)" name=" schema-properties-type if.then test failed:undefined != object - #/components/schemas/AuctionListingAddress/oneOf/1 (schema-properties-type)" time="0.148">
      <failure>schema-properties-type if.then test failed:undefined != object</failure>
    </testcase>
  </testsuite>
</testsuites>



Also available in: Atom PDF