Coder Social home page Coder Social logo

quipper / send-ci-result-to-bigquery-action Goto Github PK

View Code? Open in Web Editor NEW
0.0 7.0 0.0 10.07 MB

Send test results to BigQuery in GitHub Actions

License: Apache License 2.0

JavaScript 0.95% TypeScript 99.05%
bigquery github-actions google-bigquery junit-xml

send-ci-result-to-bigquery-action's People

Contributors

int128 avatar oakcask avatar renovate[bot] avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

send-ci-result-to-bigquery-action's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/release.yaml
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-node v4.0.2@60edb5dd545a775178f52524783378180af0d1f8
  • int128/release-typescript-action v1.29.0@ea9cfae1900a4473a9e3efe8f6ba1822140d1229
.github/workflows/ts.yaml
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-node v4.0.2@60edb5dd545a775178f52524783378180af0d1f8
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-node v4.0.2@60edb5dd545a775178f52524783378180af0d1f8
  • int128/update-generated-files-action v2.50.0@0c31bff4a68c9a6f4ac83dd528bf45f77620f191
npm
package.json
  • @actions/core 1.10.1
  • @actions/glob 0.4.0
  • @google-cloud/bigquery 7.5.2
  • fast-xml-parser 4.3.6
  • lodash 4.17.21
  • @tsconfig/node20 20.1.4
  • @types/jest 29.5.12
  • @types/node 20.12.5
  • @typescript-eslint/eslint-plugin 7.5.0
  • @typescript-eslint/parser 7.5.0
  • @vercel/ncc 0.38.1
  • eslint 9.0.0
  • eslint-plugin-jest 28.2.0
  • jest 29.7.0
  • jest-junit 16.0.0
  • prettier 3.2.5
  • ts-jest 29.1.2
  • typescript 5.4.4
regex
action.yaml
  • node 20
.github/workflows/release.yaml
  • node 20
.github/workflows/ts.yaml
  • node 20
  • node 20

  • Check this box to trigger a request for Renovate to run again on this repository

Should handle `<failure>` element's attributes: `type` and `message`

<failure> element is mixed type. So, it may have type and message attribute, and/or text content, according to the XSD schema1:

  <xs:element name="failure">
        <xs:complexType mixed="true">
            <xs:attribute name="type" type="xs:string"/>
            <xs:attribute name="message" type="xs:string"/>
        </xs:complexType>
    </xs:element>

Therefore, two data patterns below are both legal:

<?xml version="1.0" encoding="UTF-8"?>
<!--
  CASE 1: use of type and message attribute
-->
<testsuite name="rspec" tests="2" skipped="0" failures="2" errors="0" time="2.128871" timestamp="2023-10-06T04:42:34+00:00" hostname="localhost">
<properties>
<property name="seed" value="44898"/>
</properties>
<testcase classname="foo" name="foo" file="./spec/features/foo.rb" time="1.470356"><failure message="RSpec::Core::MultipleExceptionError" type="RSpec::Core::MultipleExceptionError">
</failure></testcase>
</testsuite>
<?xml version="1.0" encoding="UTF-8"?>
<!--
  CASE 2: use of text content
-->
<testsuite name="rspec" tests="2" skipped="0" failures="2" errors="0" time="2.128871" timestamp="2023-10-06T04:42:34+00:00" hostname="localhost">
<properties>
<property name="seed" value="44898"/>
</properties>
<testcase classname="foo" name="foo" file="./spec/features/foo.rb" time="1.470356"><failure>Something wrong!</failure></testcase>
</testsuite>

For CASE 1, current version of send-ci-result-to-bigquery-action will generate error like:

AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  (0, assert_1.default)('#text' in x.failure)

Footnotes

  1. https://llg.cubic.org/docs/junit/ โ†ฉ

Error: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value: (0, assert_1.default)('testcase' in x)

Problem

Fails to parse a JUnit XML report file with 0 testcases. It's still valid XML.

<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="rspec" tests="0" skipped="0" failures="0" errors="1" time="0.000042" timestamp="2023-10-04T07:34:09+00:00" hostname="foo-d8cfd4d94-7b6wd">
<properties>
<property name="seed" value="9167"/>
</properties>
</testsuite>

Error log:

Error: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  (0, assert_1.default)('testcase' in x)

AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  (0, assert_1.default)('testcase' in x)

    at assertTestSuite (/home/runner/_work/_actions/quipper/send-ci-result-to-bigquery-action/v1/lib/src/junit.js:60:1)
    at assertTestResult (/home/runner/_work/_actions/quipper/send-ci-result-to-bigquery-action/v1/lib/src/junit.js:42:1)
    at Object.parseXML (/home/runner/_work/_actions/quipper/send-ci-result-to-bigquery-action/v1/lib/src/junit.js:24:1)
    at run (/home/runner/_work/_actions/quipper/send-ci-result-to-bigquery-action/v1/lib/src/run.js:56:1)
    at main (/home/runner/_work/_actions/quipper/send-ci-result-to-bigquery-action/v1/lib/src/main.js:29:1) ***
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: '=='

Expected Behavior

send-ci-result-to-bigquery-action should not fail while ignoring the empty report file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.