Skip to content

Commit 120cd9b

Browse files
committed
fix wonky rebase
1 parent 8b0d402 commit 120cd9b

Some content is hidden

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

41 files changed

+2246
-1309
lines changed

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

Lines changed: 0 additions & 58 deletions
This file was deleted.

.github/workflows/ab-testing-ci-code.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

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

Lines changed: 146 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,149 @@ on:
1616
- '.github/workflows/ab-testing-*.yml'
1717

1818
jobs:
19-
ci:
20-
name: CI
21-
uses: ./.github/workflows/ab-testing-checks.yml
22-
with:
23-
save_build_artifact: true
24-
secrets:
25-
FASTLY_AB_TESTING_CONFIG: ${{ secrets.FASTLY_PROD_AB_TESTING_CONFIG }}
26-
FASTLY_API_TOKEN: ${{ secrets.FASTLY_PROD_API_TOKEN }}
27-
28-
deploy:
29-
name: Deploy
30-
needs: ci
31-
if: github.ref == 'refs/heads/main'
32-
uses: ./.github/workflows/ab-testing-deploy.yml
33-
with:
34-
stage: prod
35-
secrets:
36-
FASTLY_AB_TESTING_CONFIG: ${{ secrets.FASTLY_PROD_AB_TESTING_CONFIG }}
37-
FASTLY_API_TOKEN: ${{ secrets.FASTLY_PROD_API_TOKEN }}
19+
build:
20+
runs-on: ubuntu-latest
21+
name: Build
22+
defaults:
23+
run:
24+
working-directory: ab-testing
25+
env:
26+
FASTLY_AB_TESTING_CONFIG: ${{ secrets.FASTLY_AB_TESTING_CONFIG }}
27+
FASTLY_API_TOKEN: ${{ secrets.FASTLY_API_TOKEN }}
28+
29+
steps:
30+
- uses: actions/checkout@v5
31+
32+
- name: Set up Node environment
33+
uses: ./.github/actions/setup-node-env
34+
35+
- name: Test
36+
run: pnpm test
37+
38+
- name: Lint
39+
run: pnpm lint
40+
41+
- name: Prettier Check
42+
run: pnpm prettier:check
43+
44+
- name: Typecheck
45+
run: pnpm tsc
46+
47+
- name: Validate
48+
run: pnpm validate
49+
50+
- name: Build
51+
run: pnpm build
52+
53+
- uses: actions/upload-artifact@v5
54+
with:
55+
name: ab-testing-build
56+
path: ab-testing/dist
57+
58+
build-lambda:
59+
name: Build Lambda
60+
runs-on: ubuntu-latest
61+
defaults:
62+
run:
63+
working-directory: ab-testing/deploy-dictionary-lambda
64+
permissions:
65+
contents: read
66+
steps:
67+
- uses: actions/checkout@v5
68+
69+
- name: Set up Node environment
70+
uses: ./.github/actions/setup-node-env
71+
72+
- name: Build Lambda
73+
run: pnpm build
74+
75+
- name: Save build
76+
uses: actions/upload-artifact@v5
77+
with:
78+
name: ab-testing-lambda-build
79+
path: ab-testing/deploy-dictionary-lambda/dist
80+
81+
build-ui:
82+
name: UI build
83+
runs-on: ubuntu-latest
84+
defaults:
85+
run:
86+
working-directory: ab-testing/frontend
87+
permissions:
88+
contents: read
89+
steps:
90+
- uses: actions/checkout@v5
91+
92+
- name: Set up Node environment
93+
uses: ./.github/actions/setup-node-env
94+
95+
- name: Build UI
96+
run: pnpm build
97+
98+
- name: Save build
99+
uses: actions/upload-artifact@v5
100+
with:
101+
name: ui-build
102+
path: ab-testing/frontend/output/ab-tests.html
103+
if-no-files-found: error
104+
105+
riff-raff:
106+
runs-on: ubuntu-latest
107+
needs: [build, build-ui, build-lambda]
108+
permissions:
109+
id-token: write
110+
contents: read
111+
pull-requests: write
112+
defaults:
113+
run:
114+
working-directory: ab-testing
115+
116+
steps:
117+
- name: Checkout
118+
uses: actions/checkout@v5
119+
with:
120+
fetch-depth: 0
121+
persist-credentials: false
122+
123+
- name: Set up Node
124+
uses: ./.github/actions/setup-node-env
125+
126+
- name: Fetch build
127+
uses: actions/[email protected]
128+
with:
129+
name: ab-testing-build
130+
131+
- name: Fetch UI build
132+
uses: actions/[email protected]
133+
with:
134+
name: ui-build
135+
path: ab-testing/frontend/output/ab-tests.html
136+
137+
- name: Fetch Lambda build
138+
uses: actions/[email protected]
139+
with:
140+
name: ab-testing-lambda-build
141+
path: ab-testing/deploy-dictionary-lambda/dist
142+
143+
- name: CDK Test
144+
run: pnpm cdk:test
145+
146+
- name: CDK synth
147+
run: pnpm cdk:synth
148+
149+
- name: Riff-Raff Upload
150+
uses: guardian/[email protected]
151+
with:
152+
roleArn: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
153+
githubToken: ${{ secrets.GITHUB_TOKEN }}
154+
projectName: dotcom:ab-testing
155+
configPath: ab-testing/cdk.out/riff-raff.yaml
156+
contentDirectories: |
157+
ab-testing:
158+
- ab-testing/dist
159+
ab-testing-deploy-dictionary-lambda:
160+
- ab-testing/deploy-dictionary-lambda/dist
161+
admin/ab-testing:
162+
- ab-testing/frontend/output/ab-tests.html
163+
cdk.out:
164+
- ab-testing/cdk.out

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

Lines changed: 0 additions & 42 deletions
This file was deleted.

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

Lines changed: 0 additions & 73 deletions
This file was deleted.

ab-testing/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cdk.out

ab-testing/cdk.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"app": "node cdk/bin/cdk.ts",
3+
"context": {
4+
"aws-cdk:enableDiffNoFail": "true",
5+
"@aws-cdk/core:stackRelativeExports": "true"
6+
}
7+
}

0 commit comments

Comments
 (0)