Skip to content

Commit d034044

Browse files
author
Juarez Mota
committed
Merge branch 'main' of github.com:guardian/dotcom-rendering into jm/feat-prevent-banner-and-sign-in-gate-together
2 parents 975f8c7 + 6fa014f commit d034044

File tree

119 files changed

+4351
-2677
lines changed

Some content is hidden

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

119 files changed

+4351
-2677
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

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
stale:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/stale@v9
14+
- uses: actions/stale@v10
1515
id: stale
1616
# Read about options here: https://github.com/actions/stale#all-options
1717
with:

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,

0 commit comments

Comments
 (0)