Skip to content

Commit 1817190

Browse files
Merge branch 'main' into mob/inline-product-card
2 parents 4ef25ca + 3a32330 commit 1817190

File tree

109 files changed

+4342
-2696
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+4342
-2696
lines changed

.github/workflows/ab-testing-ui.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
run:
1515
working-directory: ab-testing/frontend
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v5
1818

1919
# https://github.com/denoland/setup-deno#latest-stable-for-a-major
2020
- uses: denoland/setup-deno@v1
@@ -41,7 +41,7 @@ jobs:
4141

4242
steps:
4343
- name: Checkout
44-
uses: actions/checkout@v4.2.2
44+
uses: actions/checkout@v5
4545
with:
4646
fetch-depth: 0
4747
persist-credentials: false
@@ -50,7 +50,7 @@ jobs:
5050
uses: ./.github/actions/setup-node-env
5151

5252
- name: Fetch build
53-
uses: actions/download-artifact@v4.3.0
53+
uses: actions/download-artifact@v5.0.0
5454
with:
5555
name: ui-build
5656
path: output/ab-tests.html

.github/workflows/chromatic-label-helper.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
if: ${{ github.event.pull_request.draft == false}}
2020

2121
steps:
22-
- uses: actions/github-script@v7
22+
- uses: actions/github-script@v8
2323
with:
2424
script: |
2525
const labels = await github.rest.issues

.github/workflows/dcr-chromatic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
pull-requests: write
5555
steps:
5656
- name: Remove run_chromatic label
57-
uses: actions/github-script@v7
57+
uses: actions/github-script@v8
5858
with:
5959
script: |
6060
await github.rest.issues.removeLabel({

.github/workflows/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
pull-requests: write
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/labeler@v5
12+
- uses: actions/labeler@v6
1313
with:
1414
repo-token: '${{ secrets.GITHUB_TOKEN }}'
1515
sync-labels: true # remove redundant labels after a change

ab-testing/abTest.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export const ABTests: ABTest[] = [
3131
type: 'client',
3232
audienceSize: 10 / 100,
3333
groups: ['control', 'variant'],
34+
shouldForceMetricsCollection: true,
3435
},
3536
{
3637
name: 'commercial-server-side-test',
@@ -42,6 +43,7 @@ export const ABTests: ABTest[] = [
4243
type: 'server',
4344
audienceSize: 10 / 100,
4445
groups: ['control', 'variant'],
46+
shouldForceMetricsCollection: true,
4547
},
4648
{
4749
name: 'commercial-large-overlap-test',
@@ -57,5 +59,6 @@ export const ABTests: ABTest[] = [
5759
audienceSize: 50 / 100,
5860
groups: ['control', 'variant'],
5961
audienceSpace: 'B',
62+
shouldForceMetricsCollection: true,
6063
},
6164
];

ab-testing/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// @ts-ignore - extension is required to import this as a package in DCR
2+
import { ABTests } from './abTest.ts';
3+
4+
export { ABTests };

ab-testing/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "@guardian/ab-testing",
3+
"version": "1.0.0",
4+
"description": "A/B test definitions and configuration",
5+
"main": "index.ts",
6+
"type": "module"
7+
}

ab-testing/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ type ABTest = {
3737
audienceSpace?: 'A' | 'B' | 'C';
3838
/** Test group definition */
3939
groups: string[];
40+
/** Bypasses sampling to force metrics collection for this test
41+
* See DCR Metrics component for end usage
42+
*/
43+
shouldForceMetricsCollection?: boolean;
4044
};
4145

4246
export type { ABTest, FastlyTestParams, AudienceSpace, AllSpace };

dotcom-rendering/fixtures/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ module.exports = {
156156
googletagUrl: '//securepubads.g.doubleclick.net/tag/js/gpt.js',
157157
mmaUrl: 'https://manage.theguardian.com',
158158
abTests: {},
159+
serverSideABTests: {},
159160
edition: 'UK',
160161
ipsosTag: 'environment',
161162
isLiveBlog: false,

dotcom-rendering/fixtures/generated/cricket-match.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1882,6 +1882,7 @@ export const cricketMatchData: FECricketMatchPage = {
18821882
prebidBidCache: true,
18831883
},
18841884
abTests: {},
1885+
serverSideABTests: {},
18851886
googletagUrl: '//securepubads.g.doubleclick.net/tag/js/gpt.js',
18861887
stage: 'PROD',
18871888
frontendAssetsFullURL: 'https://assets.guim.co.uk/',
@@ -1901,7 +1902,7 @@ export const cricketMatchData: FECricketMatchPage = {
19011902
forecastsapiurl: '/weatherapi/forecast',
19021903
supportUrl: 'https://support.theguardian.com',
19031904
commercialBundleUrl:
1904-
'https://assets.guim.co.uk/commercial/b46e5e342ee9d3f9e36a/graun.standalone.commercial.js',
1905+
'https://assets.guim.co.uk/commercial/d05ba48ca72061c05d80/graun.standalone.commercial.js',
19051906
idOAuthUrl: 'https://oauth.theguardian.com',
19061907
webTitle: 'Fifth Test Match, The Kia Oval',
19071908
isFront: false,

0 commit comments

Comments
 (0)