From 2a71dafac9a0e93828815746f5d5d2863e411d4f Mon Sep 17 00:00:00 2001 From: caddoo Date: Mon, 17 Jun 2024 15:40:02 +1200 Subject: [PATCH] Pass in testomat integration key, when not running unit tests. (#22294) * add option to log to xml * set correct env variable for testomatio * shorten test time * Remove additional php unit param * Change expression to only pass in if not unit test * Temporarily use branch for test action * Remove logic for deciding if api key should be passed in * Only report to testomatio for UI tests when not pull request * Only report to testomatio for UI tests when env variable is true * Update matomo-tests.yml --------- Co-authored-by: Stefan Giehl --- .github/workflows/matomo-tests.yml | 1 + tests/UI/config.dist.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/matomo-tests.yml b/.github/workflows/matomo-tests.yml index 1feffdf0215..154ce2c2440 100644 --- a/.github/workflows/matomo-tests.yml +++ b/.github/workflows/matomo-tests.yml @@ -70,6 +70,7 @@ jobs: redis-service: true artifacts-pass: ${{ secrets.ARTIFACTS_PASS }} upload-artifacts: ${{ matrix.php == '7.2' }} + testomatio: ${{ secrets.TESTOMATIO_INTEGRATION }} Javascript: runs-on: ubuntu-20.04 timeout-minutes: 15 diff --git a/tests/UI/config.dist.js b/tests/UI/config.dist.js index 746f2e2dbd0..bab41ad0bb6 100644 --- a/tests/UI/config.dist.js +++ b/tests/UI/config.dist.js @@ -40,7 +40,7 @@ exports.chai = 'chai-1.9.0'; /** * Mocha reporters to use (can be multiple delimited by a comma). */ -if (process.env.TESTOMATIO) { +if (process.env.TESTOMATIO && process.env.SHOULD_SEND_TO_TESTOMATIO === 'true') { exports.reporter = 'mocha-multi-reporters'; exports.reporterOptions = { reporterEnabled: 'spec, @testomatio/reporter/lib/adapter/mocha.js',