Skip to content

Bump the cdk group with 4 updates #310

Bump the cdk group with 4 updates

Bump the cdk group with 4 updates #310

Workflow file for this run

name: 🧪 AB testing
permissions:
contents: read
on:
push:
paths:
- 'ab-testing/**'
- '.github/workflows/ab-testing-ci.yml'
jobs:
config-ci:
runs-on: ubuntu-latest
name: Config CI
defaults:
run:
working-directory: ab-testing/config
env:
FASTLY_AB_TESTING_CONFIG: ${{ secrets.FASTLY_PROD_AB_TESTING_CONFIG }}
FASTLY_API_TOKEN: ${{ secrets.FASTLY_PROD_API_TOKEN }}
steps:
- uses: actions/checkout@v5
- name: Set up Node environment
uses: ./.github/actions/setup-node-env
- name: Test
run: pnpm test
- name: Lint
run: pnpm lint
- name: Prettier Check
run: pnpm prettier:check
- name: Typecheck
run: pnpm tsc
- name: Validate
run: pnpm validate
- name: Build
run: pnpm build
- uses: actions/upload-artifact@v5
with:
name: ab-testing-build
path: ab-testing/config/dist
ui-ci:
name: UI CI
runs-on: ubuntu-latest
defaults:
run:
working-directory: ab-testing/frontend
permissions:
contents: read
steps:
- uses: actions/checkout@v5
- name: Set up Node environment
uses: ./.github/actions/setup-node-env
- name: Build UI
run: pnpm build
- name: Save build
uses: actions/upload-artifact@v5
with:
name: ui-build
path: ab-testing/frontend/output/ab-tests.html
if-no-files-found: error
lambda-ci:
name: Lambda CI
runs-on: ubuntu-latest
defaults:
run:
working-directory: ab-testing/deploy-lambda
permissions:
contents: read
steps:
- uses: actions/checkout@v5
- name: Set up Node environment
uses: ./.github/actions/setup-node-env
- name: Build Lambda
run: pnpm build
- name: Zip app artifact
run: |
cd dist
zip -r lambda.zip .
zip -j lambda.zip ../package.json
- name: Save build
uses: actions/upload-artifact@v5
with:
name: ab-testing-lambda-build
path: ab-testing/deploy-lambda/dist/lambda.zip
riff-raff:
name: Riff-Raff Artifacts
runs-on: ubuntu-latest
needs: [config-ci, ui-ci, lambda-ci]
permissions:
id-token: write
contents: read
pull-requests: write
defaults:
run:
working-directory: ab-testing
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Node
uses: ./.github/actions/setup-node-env
- name: Fetch config build
uses: actions/[email protected]
with:
name: ab-testing-build
path: ab-testing/config/dist
- name: Fetch UI build
uses: actions/[email protected]
with:
name: ui-build
path: ab-testing/frontend/output/ab-tests.html
- name: Fetch Lambda build
uses: actions/[email protected]
with:
name: ab-testing-lambda-build
path: ab-testing/deploy-lambda/dist/lambda.zip
- name: CDK Test
run: pnpm --filter @guardian/ab-testing-cdk test
- name: CDK synth
run: pnpm --filter @guardian/ab-testing-cdk synth
- name: Riff-Raff Upload
uses: guardian/[email protected]
with:
roleArn: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: dotcom:ab-testing
configPath: ab-testing/cdk/cdk.out/riff-raff.yaml
contentDirectories: |
ab-testing-config-artifacts:
- ab-testing/config/dist
ab-testing-deployment-lambda:
- ab-testing/deploy-lambda/dist/lambda.zip
ab-testing-ui-artifact:
- ab-testing/frontend/output/ab-tests.html
cdk.out:
- ab-testing/cdk/cdk.out