From 1c74d1aac38d32b38ccf43584762c5b62c930d2e Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 24 Mar 2023 13:35:45 +0100 Subject: [PATCH 01/16] Update test runner script to include new data structure --- monorepo/scripts/ping-openanalytics-testrunner.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/monorepo/scripts/ping-openanalytics-testrunner.php b/monorepo/scripts/ping-openanalytics-testrunner.php index d2451ceb489..ef50777232b 100644 --- a/monorepo/scripts/ping-openanalytics-testrunner.php +++ b/monorepo/scripts/ping-openanalytics-testrunner.php @@ -56,6 +56,10 @@ $data[explode('=', $pair)[0]] = explode('=', $pair)[1]; } +$data['commit'] = shell_exec('git rev-parse HEAD'); +$data['branch'] = shell_exec('git rev-parse --abbrev-ref HEAD'); +$data['runner_os'] = php_uname('s'); + curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data)); $resp = curl_exec($curl); From 393264898bf7b017b3d6dbd19a8a1d7b71642b94 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 24 Mar 2023 13:39:07 +0100 Subject: [PATCH 02/16] Bump test runner script --- .github/workflows/continuous-integration.yml | 4 ++-- .github/workflows/smoke-tests.yml | 4 ++-- .github/workflows/test-pull-requests.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 36fdb1ef96a..873ee5b24cb 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -68,7 +68,7 @@ jobs: - name: Ping statistics server with test results run: | - curl https://raw.githubusercontent.com/hydephp/develop/08308fb9e9b4f72321bf90d37a8c9143a938a231/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/1c74d1aac38d32b38ccf43584762c5b62c930d2e/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo CI Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} system-testing: @@ -212,7 +212,7 @@ jobs: - name: Ping statistics server with test results run: | cp build/junit.xml report.xml - curl https://raw.githubusercontent.com/hydephp/develop/08308fb9e9b4f72321bf90d37a8c9143a938a231/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/1c74d1aac38d32b38ccf43584762c5b62c930d2e/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} - name: Upload coverage artifacts diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index e19612d98b6..f714e5532e2 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -29,7 +29,7 @@ jobs: - name: Ping statistics server with test results run: | - curl https://raw.githubusercontent.com/hydephp/develop/08308fb9e9b4f72321bf90d37a8c9143a938a231/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/1c74d1aac38d32b38ccf43584762c5b62c930d2e/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo Smoke Tests" ${{ secrets.OPENANALYTICS_TOKEN }} @@ -68,5 +68,5 @@ jobs: - name: Ping statistics server with test results run: | - curl https://raw.githubusercontent.com/hydephp/develop/08308fb9e9b4f72321bf90d37a8c9143a938a231/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/1c74d1aac38d32b38ccf43584762c5b62c930d2e/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo Smoke Tests - Coverage" ${{ secrets.OPENANALYTICS_TOKEN }} diff --git a/.github/workflows/test-pull-requests.yml b/.github/workflows/test-pull-requests.yml index 31b2c61a89c..37011645bf6 100644 --- a/.github/workflows/test-pull-requests.yml +++ b/.github/workflows/test-pull-requests.yml @@ -51,7 +51,7 @@ jobs: - name: Ping statistics server with test results run: | cp build/junit.xml report.xml - curl https://raw.githubusercontent.com/hydephp/develop/08308fb9e9b4f72321bf90d37a8c9143a938a231/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/1c74d1aac38d32b38ccf43584762c5b62c930d2e/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} test-matrix: @@ -77,5 +77,5 @@ jobs: - name: Ping statistics server with test results run: | - curl https://raw.githubusercontent.com/hydephp/develop/08308fb9e9b4f72321bf90d37a8c9143a938a231/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/1c74d1aac38d32b38ccf43584762c5b62c930d2e/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo PR Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} From 86a027fdd612c85e3a75c66e3f2ce499be386fec Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 24 Mar 2023 13:43:45 +0100 Subject: [PATCH 03/16] Change Git command --- monorepo/scripts/ping-openanalytics-testrunner.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monorepo/scripts/ping-openanalytics-testrunner.php b/monorepo/scripts/ping-openanalytics-testrunner.php index ef50777232b..50f060f02f2 100644 --- a/monorepo/scripts/ping-openanalytics-testrunner.php +++ b/monorepo/scripts/ping-openanalytics-testrunner.php @@ -57,7 +57,7 @@ } $data['commit'] = shell_exec('git rev-parse HEAD'); -$data['branch'] = shell_exec('git rev-parse --abbrev-ref HEAD'); +$data['branch'] = shell_exec('git branch --show-current'); $data['runner_os'] = php_uname('s'); curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data)); From b843856decdce88af5d3db38cb167f0838e37e71 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 24 Mar 2023 13:44:30 +0100 Subject: [PATCH 04/16] Bump test runner script --- .github/workflows/continuous-integration.yml | 4 ++-- .github/workflows/smoke-tests.yml | 4 ++-- .github/workflows/test-pull-requests.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 873ee5b24cb..ea0ec38ddce 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -68,7 +68,7 @@ jobs: - name: Ping statistics server with test results run: | - curl https://raw.githubusercontent.com/hydephp/develop/1c74d1aac38d32b38ccf43584762c5b62c930d2e/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/86a027fdd612c85e3a75c66e3f2ce499be386fec/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo CI Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} system-testing: @@ -212,7 +212,7 @@ jobs: - name: Ping statistics server with test results run: | cp build/junit.xml report.xml - curl https://raw.githubusercontent.com/hydephp/develop/1c74d1aac38d32b38ccf43584762c5b62c930d2e/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/86a027fdd612c85e3a75c66e3f2ce499be386fec/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} - name: Upload coverage artifacts diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index f714e5532e2..fa5262f15d5 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -29,7 +29,7 @@ jobs: - name: Ping statistics server with test results run: | - curl https://raw.githubusercontent.com/hydephp/develop/1c74d1aac38d32b38ccf43584762c5b62c930d2e/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/86a027fdd612c85e3a75c66e3f2ce499be386fec/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo Smoke Tests" ${{ secrets.OPENANALYTICS_TOKEN }} @@ -68,5 +68,5 @@ jobs: - name: Ping statistics server with test results run: | - curl https://raw.githubusercontent.com/hydephp/develop/1c74d1aac38d32b38ccf43584762c5b62c930d2e/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/86a027fdd612c85e3a75c66e3f2ce499be386fec/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo Smoke Tests - Coverage" ${{ secrets.OPENANALYTICS_TOKEN }} diff --git a/.github/workflows/test-pull-requests.yml b/.github/workflows/test-pull-requests.yml index 37011645bf6..73ed3edf8f5 100644 --- a/.github/workflows/test-pull-requests.yml +++ b/.github/workflows/test-pull-requests.yml @@ -51,7 +51,7 @@ jobs: - name: Ping statistics server with test results run: | cp build/junit.xml report.xml - curl https://raw.githubusercontent.com/hydephp/develop/1c74d1aac38d32b38ccf43584762c5b62c930d2e/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/86a027fdd612c85e3a75c66e3f2ce499be386fec/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} test-matrix: @@ -77,5 +77,5 @@ jobs: - name: Ping statistics server with test results run: | - curl https://raw.githubusercontent.com/hydephp/develop/1c74d1aac38d32b38ccf43584762c5b62c930d2e/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/86a027fdd612c85e3a75c66e3f2ce499be386fec/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo PR Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} From bf9bcef431ca137847098ad9287aaff2fb905e3a Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 24 Mar 2023 13:47:53 +0100 Subject: [PATCH 05/16] Support getting branch from arguments As not all CI runners have branch information --- monorepo/scripts/ping-openanalytics-testrunner.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monorepo/scripts/ping-openanalytics-testrunner.php b/monorepo/scripts/ping-openanalytics-testrunner.php index 50f060f02f2..ccd3cf35f08 100644 --- a/monorepo/scripts/ping-openanalytics-testrunner.php +++ b/monorepo/scripts/ping-openanalytics-testrunner.php @@ -11,6 +11,7 @@ $runner = $argv[1] ?? exit(400); $token = $argv[2] ?? null; +$branch = $argv[3] ?? null; if ($token === null) { // Probably running in a fork echo "::warning:: No token provided, skipping ping\n"; @@ -57,7 +58,7 @@ } $data['commit'] = shell_exec('git rev-parse HEAD'); -$data['branch'] = shell_exec('git branch --show-current'); +$data['branch'] = $branch ?? shell_exec('git branch --show-current'); $data['runner_os'] = php_uname('s'); curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data)); From 46436e505dc1d9ded8404a7b3c46d1435340a772 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 24 Mar 2023 13:48:36 +0100 Subject: [PATCH 06/16] Bump test runner script --- .github/workflows/continuous-integration.yml | 4 ++-- .github/workflows/smoke-tests.yml | 4 ++-- .github/workflows/test-pull-requests.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index ea0ec38ddce..b48172639b5 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -68,7 +68,7 @@ jobs: - name: Ping statistics server with test results run: | - curl https://raw.githubusercontent.com/hydephp/develop/86a027fdd612c85e3a75c66e3f2ce499be386fec/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/bf9bcef431ca137847098ad9287aaff2fb905e3a/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo CI Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} system-testing: @@ -212,7 +212,7 @@ jobs: - name: Ping statistics server with test results run: | cp build/junit.xml report.xml - curl https://raw.githubusercontent.com/hydephp/develop/86a027fdd612c85e3a75c66e3f2ce499be386fec/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/bf9bcef431ca137847098ad9287aaff2fb905e3a/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} - name: Upload coverage artifacts diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index fa5262f15d5..e9a12571af5 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -29,7 +29,7 @@ jobs: - name: Ping statistics server with test results run: | - curl https://raw.githubusercontent.com/hydephp/develop/86a027fdd612c85e3a75c66e3f2ce499be386fec/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/bf9bcef431ca137847098ad9287aaff2fb905e3a/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo Smoke Tests" ${{ secrets.OPENANALYTICS_TOKEN }} @@ -68,5 +68,5 @@ jobs: - name: Ping statistics server with test results run: | - curl https://raw.githubusercontent.com/hydephp/develop/86a027fdd612c85e3a75c66e3f2ce499be386fec/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/bf9bcef431ca137847098ad9287aaff2fb905e3a/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo Smoke Tests - Coverage" ${{ secrets.OPENANALYTICS_TOKEN }} diff --git a/.github/workflows/test-pull-requests.yml b/.github/workflows/test-pull-requests.yml index 73ed3edf8f5..821d53518bc 100644 --- a/.github/workflows/test-pull-requests.yml +++ b/.github/workflows/test-pull-requests.yml @@ -51,7 +51,7 @@ jobs: - name: Ping statistics server with test results run: | cp build/junit.xml report.xml - curl https://raw.githubusercontent.com/hydephp/develop/86a027fdd612c85e3a75c66e3f2ce499be386fec/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/bf9bcef431ca137847098ad9287aaff2fb905e3a/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} test-matrix: @@ -77,5 +77,5 @@ jobs: - name: Ping statistics server with test results run: | - curl https://raw.githubusercontent.com/hydephp/develop/86a027fdd612c85e3a75c66e3f2ce499be386fec/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/bf9bcef431ca137847098ad9287aaff2fb905e3a/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo PR Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} From ef6f93ed976030540b0e4fc946fb0cb9ba45cc14 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 24 Mar 2023 13:50:17 +0100 Subject: [PATCH 07/16] Document GitHub ref --- monorepo/scripts/ping-openanalytics-testrunner.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monorepo/scripts/ping-openanalytics-testrunner.php b/monorepo/scripts/ping-openanalytics-testrunner.php index ccd3cf35f08..832d0b2744b 100644 --- a/monorepo/scripts/ping-openanalytics-testrunner.php +++ b/monorepo/scripts/ping-openanalytics-testrunner.php @@ -3,7 +3,7 @@ /** * @internal This script is used to ping the OpenAnalytics server with the test results. * - * @example php ping.php 'Monorepo Smoke Tests' ${{ secrets.OPENANALYTICS_TOKEN }} + * @example php ping.php 'Monorepo Smoke Tests' ${{ secrets.OPENANALYTICS_TOKEN }} ${{ GITHUB_REF }} * * @uses vendor/bin/pest --stop-on-failure --log-junit report.xml */ From 5fd2f0e42ca1ef3ed6c6ad32c4b6112d32052644 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 24 Mar 2023 13:51:13 +0100 Subject: [PATCH 08/16] Pass GitHub ref --- .github/workflows/continuous-integration.yml | 8 ++++---- .github/workflows/smoke-tests.yml | 8 ++++---- .github/workflows/test-pull-requests.yml | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index b48172639b5..152627656d3 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -68,8 +68,8 @@ jobs: - name: Ping statistics server with test results run: | - curl https://raw.githubusercontent.com/hydephp/develop/bf9bcef431ca137847098ad9287aaff2fb905e3a/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo CI Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} + curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + php ping.php "Monorepo CI Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ GITHUB_REF }} system-testing: strategy: @@ -212,8 +212,8 @@ jobs: - name: Ping statistics server with test results run: | cp build/junit.xml report.xml - curl https://raw.githubusercontent.com/hydephp/develop/bf9bcef431ca137847098ad9287aaff2fb905e3a/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} + curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ GITHUB_REF }} - name: Upload coverage artifacts uses: actions/upload-artifact@v1 diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index e9a12571af5..e817f055c79 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -29,8 +29,8 @@ jobs: - name: Ping statistics server with test results run: | - curl https://raw.githubusercontent.com/hydephp/develop/bf9bcef431ca137847098ad9287aaff2fb905e3a/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo Smoke Tests" ${{ secrets.OPENANALYTICS_TOKEN }} + curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + php ping.php "Monorepo Smoke Tests" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ GITHUB_REF }} test-coverage: @@ -68,5 +68,5 @@ jobs: - name: Ping statistics server with test results run: | - curl https://raw.githubusercontent.com/hydephp/develop/bf9bcef431ca137847098ad9287aaff2fb905e3a/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo Smoke Tests - Coverage" ${{ secrets.OPENANALYTICS_TOKEN }} + curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + php ping.php "Monorepo Smoke Tests - Coverage" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ GITHUB_REF }} diff --git a/.github/workflows/test-pull-requests.yml b/.github/workflows/test-pull-requests.yml index 821d53518bc..fa28ae5e438 100644 --- a/.github/workflows/test-pull-requests.yml +++ b/.github/workflows/test-pull-requests.yml @@ -51,8 +51,8 @@ jobs: - name: Ping statistics server with test results run: | cp build/junit.xml report.xml - curl https://raw.githubusercontent.com/hydephp/develop/bf9bcef431ca137847098ad9287aaff2fb905e3a/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} + curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ GITHUB_REF }} test-matrix: strategy: @@ -77,5 +77,5 @@ jobs: - name: Ping statistics server with test results run: | - curl https://raw.githubusercontent.com/hydephp/develop/bf9bcef431ca137847098ad9287aaff2fb905e3a/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo PR Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} + curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + php ping.php "Monorepo PR Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ GITHUB_REF }} From 8076b54d1caf9fb7c64830b939cff8a67bb4c2e8 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 24 Mar 2023 13:56:50 +0100 Subject: [PATCH 09/16] Use expression instead of environment variable --- .github/workflows/continuous-integration.yml | 4 ++-- .github/workflows/smoke-tests.yml | 4 ++-- .github/workflows/test-pull-requests.yml | 4 ++-- monorepo/scripts/ping-openanalytics-testrunner.php | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 152627656d3..e2f049c856b 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -69,7 +69,7 @@ jobs: - name: Ping statistics server with test results run: | curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo CI Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ GITHUB_REF }} + php ping.php "Monorepo CI Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} system-testing: strategy: @@ -213,7 +213,7 @@ jobs: run: | cp build/junit.xml report.xml curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ GITHUB_REF }} + php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} - name: Upload coverage artifacts uses: actions/upload-artifact@v1 diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index e817f055c79..d6314ed673c 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -30,7 +30,7 @@ jobs: - name: Ping statistics server with test results run: | curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo Smoke Tests" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ GITHUB_REF }} + php ping.php "Monorepo Smoke Tests" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} test-coverage: @@ -69,4 +69,4 @@ jobs: - name: Ping statistics server with test results run: | curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo Smoke Tests - Coverage" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ GITHUB_REF }} + php ping.php "Monorepo Smoke Tests - Coverage" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} diff --git a/.github/workflows/test-pull-requests.yml b/.github/workflows/test-pull-requests.yml index fa28ae5e438..cea4ae2f3bc 100644 --- a/.github/workflows/test-pull-requests.yml +++ b/.github/workflows/test-pull-requests.yml @@ -52,7 +52,7 @@ jobs: run: | cp build/junit.xml report.xml curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ GITHUB_REF }} + php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} test-matrix: strategy: @@ -78,4 +78,4 @@ jobs: - name: Ping statistics server with test results run: | curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo PR Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ GITHUB_REF }} + php ping.php "Monorepo PR Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} diff --git a/monorepo/scripts/ping-openanalytics-testrunner.php b/monorepo/scripts/ping-openanalytics-testrunner.php index 832d0b2744b..c7d8e7c0298 100644 --- a/monorepo/scripts/ping-openanalytics-testrunner.php +++ b/monorepo/scripts/ping-openanalytics-testrunner.php @@ -3,7 +3,7 @@ /** * @internal This script is used to ping the OpenAnalytics server with the test results. * - * @example php ping.php 'Monorepo Smoke Tests' ${{ secrets.OPENANALYTICS_TOKEN }} ${{ GITHUB_REF }} + * @example php ping.php 'Monorepo Smoke Tests' ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} * * @uses vendor/bin/pest --stop-on-failure --log-junit report.xml */ From 7e580140802d277b4297e298fc91dc0a70e79a78 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 24 Mar 2023 14:00:32 +0100 Subject: [PATCH 10/16] Call environment variable with proper expression syntax --- .github/workflows/continuous-integration.yml | 4 ++-- .github/workflows/smoke-tests.yml | 4 ++-- .github/workflows/test-pull-requests.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index e2f049c856b..f8f0b1cf267 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -69,7 +69,7 @@ jobs: - name: Ping statistics server with test results run: | curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo CI Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} + php ping.php "Monorepo CI Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF_NAME }} system-testing: strategy: @@ -213,7 +213,7 @@ jobs: run: | cp build/junit.xml report.xml curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} + php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF_NAME }} - name: Upload coverage artifacts uses: actions/upload-artifact@v1 diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index d6314ed673c..0eb5117d531 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -30,7 +30,7 @@ jobs: - name: Ping statistics server with test results run: | curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo Smoke Tests" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} + php ping.php "Monorepo Smoke Tests" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF_NAME }} test-coverage: @@ -69,4 +69,4 @@ jobs: - name: Ping statistics server with test results run: | curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo Smoke Tests - Coverage" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} + php ping.php "Monorepo Smoke Tests - Coverage" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF_NAME }} diff --git a/.github/workflows/test-pull-requests.yml b/.github/workflows/test-pull-requests.yml index cea4ae2f3bc..9c2200b7bc4 100644 --- a/.github/workflows/test-pull-requests.yml +++ b/.github/workflows/test-pull-requests.yml @@ -52,7 +52,7 @@ jobs: run: | cp build/junit.xml report.xml curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} + php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF_NAME }} test-matrix: strategy: @@ -78,4 +78,4 @@ jobs: - name: Ping statistics server with test results run: | curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo PR Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} + php ping.php "Monorepo PR Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF_NAME }} From ccef288c5087b1060efebfade0a44c9d93d016ea Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 24 Mar 2023 14:04:00 +0100 Subject: [PATCH 11/16] Update variable name --- .github/workflows/continuous-integration.yml | 4 ++-- .github/workflows/smoke-tests.yml | 4 ++-- .github/workflows/test-pull-requests.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index f8f0b1cf267..932691b1f3e 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -69,7 +69,7 @@ jobs: - name: Ping statistics server with test results run: | curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo CI Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF_NAME }} + php ping.php "Monorepo CI Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF }} system-testing: strategy: @@ -213,7 +213,7 @@ jobs: run: | cp build/junit.xml report.xml curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF_NAME }} + php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF }} - name: Upload coverage artifacts uses: actions/upload-artifact@v1 diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 0eb5117d531..c72dd3a8497 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -30,7 +30,7 @@ jobs: - name: Ping statistics server with test results run: | curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo Smoke Tests" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF_NAME }} + php ping.php "Monorepo Smoke Tests" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF }} test-coverage: @@ -69,4 +69,4 @@ jobs: - name: Ping statistics server with test results run: | curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo Smoke Tests - Coverage" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF_NAME }} + php ping.php "Monorepo Smoke Tests - Coverage" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF }} diff --git a/.github/workflows/test-pull-requests.yml b/.github/workflows/test-pull-requests.yml index 9c2200b7bc4..573bfdbf4f5 100644 --- a/.github/workflows/test-pull-requests.yml +++ b/.github/workflows/test-pull-requests.yml @@ -52,7 +52,7 @@ jobs: run: | cp build/junit.xml report.xml curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF_NAME }} + php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF }} test-matrix: strategy: @@ -78,4 +78,4 @@ jobs: - name: Ping statistics server with test results run: | curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo PR Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF_NAME }} + php ping.php "Monorepo PR Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF }} From 4acc82cfb5ff431302dcbb2b11c5331efd47c872 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 24 Mar 2023 14:07:39 +0100 Subject: [PATCH 12/16] Add upcoming docs --- monorepo/scripts/ping-openanalytics-testrunner.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monorepo/scripts/ping-openanalytics-testrunner.php b/monorepo/scripts/ping-openanalytics-testrunner.php index c7d8e7c0298..d8ad25053f3 100644 --- a/monorepo/scripts/ping-openanalytics-testrunner.php +++ b/monorepo/scripts/ping-openanalytics-testrunner.php @@ -49,6 +49,8 @@ // 'commit' => 'string:nullable', // 'branch' => 'string:nullable', // 'runner_os' => 'string:nullable', +// // Upcoming +//. 'pull_request_number' => 'integer:nullable', $junit = str_replace("''", '""', str_replace('"', '', str_replace('""', "''", substr(substr(explode("\n", file_get_contents('report.xml'))[2], 13), 0, -3))) From 86b9f8898b10935de9ade3e7fae459c1e2438b73 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 24 Mar 2023 14:08:17 +0100 Subject: [PATCH 13/16] Bump test runner script --- .github/workflows/continuous-integration.yml | 4 ++-- .github/workflows/smoke-tests.yml | 4 ++-- .github/workflows/test-pull-requests.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 932691b1f3e..f6409f535a2 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -68,7 +68,7 @@ jobs: - name: Ping statistics server with test results run: | - curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/4acc82cfb5ff431302dcbb2b11c5331efd47c872/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo CI Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF }} system-testing: @@ -212,7 +212,7 @@ jobs: - name: Ping statistics server with test results run: | cp build/junit.xml report.xml - curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/4acc82cfb5ff431302dcbb2b11c5331efd47c872/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF }} - name: Upload coverage artifacts diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index c72dd3a8497..3f16953565f 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -29,7 +29,7 @@ jobs: - name: Ping statistics server with test results run: | - curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/4acc82cfb5ff431302dcbb2b11c5331efd47c872/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo Smoke Tests" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF }} @@ -68,5 +68,5 @@ jobs: - name: Ping statistics server with test results run: | - curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/4acc82cfb5ff431302dcbb2b11c5331efd47c872/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo Smoke Tests - Coverage" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF }} diff --git a/.github/workflows/test-pull-requests.yml b/.github/workflows/test-pull-requests.yml index 573bfdbf4f5..d2b071ef7e9 100644 --- a/.github/workflows/test-pull-requests.yml +++ b/.github/workflows/test-pull-requests.yml @@ -51,7 +51,7 @@ jobs: - name: Ping statistics server with test results run: | cp build/junit.xml report.xml - curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/4acc82cfb5ff431302dcbb2b11c5331efd47c872/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF }} test-matrix: @@ -77,5 +77,5 @@ jobs: - name: Ping statistics server with test results run: | - curl https://raw.githubusercontent.com/hydephp/develop/ef6f93ed976030540b0e4fc946fb0cb9ba45cc14/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php + curl https://raw.githubusercontent.com/hydephp/develop/4acc82cfb5ff431302dcbb2b11c5331efd47c872/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo PR Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF }} From 66a829d0363b251e0180623aa2f606481bca1219 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Fri, 24 Mar 2023 13:08:31 +0000 Subject: [PATCH 14/16] Apply fixes from StyleCI --- monorepo/scripts/ping-openanalytics-testrunner.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monorepo/scripts/ping-openanalytics-testrunner.php b/monorepo/scripts/ping-openanalytics-testrunner.php index d8ad25053f3..4cecbb39088 100644 --- a/monorepo/scripts/ping-openanalytics-testrunner.php +++ b/monorepo/scripts/ping-openanalytics-testrunner.php @@ -50,7 +50,7 @@ // 'branch' => 'string:nullable', // 'runner_os' => 'string:nullable', // // Upcoming -//. 'pull_request_number' => 'integer:nullable', +//. 'pull_request_number' => 'integer:nullable', $junit = str_replace("''", '""', str_replace('"', '', str_replace('""', "''", substr(substr(explode("\n", file_get_contents('report.xml'))[2], 13), 0, -3))) From 08265a1d6fb1cd7ca6cf5f760b2b35e407038bb5 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 24 Mar 2023 14:10:00 +0100 Subject: [PATCH 15/16] Revert "Add upcoming docs" This reverts commit 4acc82cfb5ff431302dcbb2b11c5331efd47c872. GITHUB_BASE_REF is the short branch name for the target branch during a PR trigger, and it is empty otherwise. GITHUB_REF always has a value, but the value changes based on the context. Outside of a PR, GITHUB_REF is the "full" branch name (refs/heads/master). Inside of a PR, it is the PR branch name (refs/pull/123/merge). --- monorepo/scripts/ping-openanalytics-testrunner.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/monorepo/scripts/ping-openanalytics-testrunner.php b/monorepo/scripts/ping-openanalytics-testrunner.php index d8ad25053f3..c7d8e7c0298 100644 --- a/monorepo/scripts/ping-openanalytics-testrunner.php +++ b/monorepo/scripts/ping-openanalytics-testrunner.php @@ -49,8 +49,6 @@ // 'commit' => 'string:nullable', // 'branch' => 'string:nullable', // 'runner_os' => 'string:nullable', -// // Upcoming -//. 'pull_request_number' => 'integer:nullable', $junit = str_replace("''", '""', str_replace('"', '', str_replace('""', "''", substr(substr(explode("\n", file_get_contents('report.xml'))[2], 13), 0, -3))) From 2d6fa7685c758361a706b5cfd772a52bb141ee11 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 24 Mar 2023 14:11:52 +0100 Subject: [PATCH 16/16] Revert "Call environment variable with proper expression syntax" This reverts commit 7e580140802d277b4297e298fc91dc0a70e79a78. --- .github/workflows/continuous-integration.yml | 4 ++-- .github/workflows/smoke-tests.yml | 4 ++-- .github/workflows/test-pull-requests.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index f6409f535a2..62387f99531 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -69,7 +69,7 @@ jobs: - name: Ping statistics server with test results run: | curl https://raw.githubusercontent.com/hydephp/develop/4acc82cfb5ff431302dcbb2b11c5331efd47c872/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo CI Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF }} + php ping.php "Monorepo CI Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} system-testing: strategy: @@ -213,7 +213,7 @@ jobs: run: | cp build/junit.xml report.xml curl https://raw.githubusercontent.com/hydephp/develop/4acc82cfb5ff431302dcbb2b11c5331efd47c872/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF }} + php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} - name: Upload coverage artifacts uses: actions/upload-artifact@v1 diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 3f16953565f..f4fafb92f16 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -30,7 +30,7 @@ jobs: - name: Ping statistics server with test results run: | curl https://raw.githubusercontent.com/hydephp/develop/4acc82cfb5ff431302dcbb2b11c5331efd47c872/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo Smoke Tests" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF }} + php ping.php "Monorepo Smoke Tests" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} test-coverage: @@ -69,4 +69,4 @@ jobs: - name: Ping statistics server with test results run: | curl https://raw.githubusercontent.com/hydephp/develop/4acc82cfb5ff431302dcbb2b11c5331efd47c872/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo Smoke Tests - Coverage" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF }} + php ping.php "Monorepo Smoke Tests - Coverage" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} diff --git a/.github/workflows/test-pull-requests.yml b/.github/workflows/test-pull-requests.yml index d2b071ef7e9..613d75da1de 100644 --- a/.github/workflows/test-pull-requests.yml +++ b/.github/workflows/test-pull-requests.yml @@ -52,7 +52,7 @@ jobs: run: | cp build/junit.xml report.xml curl https://raw.githubusercontent.com/hydephp/develop/4acc82cfb5ff431302dcbb2b11c5331efd47c872/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF }} + php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} test-matrix: strategy: @@ -78,4 +78,4 @@ jobs: - name: Ping statistics server with test results run: | curl https://raw.githubusercontent.com/hydephp/develop/4acc82cfb5ff431302dcbb2b11c5331efd47c872/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php - php ping.php "Monorepo PR Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ env.GITHUB_REF }} + php ping.php "Monorepo PR Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }}