Files
cloudflare--workers-sdk/.github/workflows/worker-playground-preview-testing-env-deploy-and-test.yml
wehub-resource-sync 70bf21e064
Handle Changesets / Handle Changesets (push) Waiting to run
Semgrep OSS scan / semgrep-oss (push) Waiting to run
Deploy (to testing) and Test Playground Preview Worker / Deploy Playground Preview Worker (testing) (push) Has been skipped
Deploy Workers Shared Staging / Deploy Workers Shared Staging (push) Failing after 0s
Prerelease / build (push) Has been skipped
chore: import upstream snapshot with attribution
2026-07-13 12:30:11 +08:00

61 lines
1.9 KiB
YAML

name: Deploy (to testing) and Test Playground Preview Worker
# This workflow is designed to deploy a "testing" version of the Playground Preview Worker
# and test it via integration tests.
# Triggers:
# - push to `main`, on Cloudflare, where there are changes to the files in this worker's package
# - update to a PR, on Cloudflare, labelled as `playground-worker`
#
# Actions:
# - deploy to testing environment
# - run the end-to-end tests against testing deployment
on:
push:
branches:
- main
paths:
- "packages/playground-preview-worker/**"
pull_request:
types: [synchronize, opened, reopened, labeled, unlabeled]
permissions:
contents: read
jobs:
e2e-test:
if: github.repository_owner == 'cloudflare' && (github.event_name != 'pull_request' || contains(github.event.*.labels.*.name, 'feature:playground-worker'))
name: "Deploy Playground Preview Worker (testing)"
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 1
persist-credentials: false
- name: Install Dependencies
uses: ./.github/actions/install-dependencies
- name: Build tools and libraries
run: pnpm run build
env:
NODE_ENV: "production"
CI_OS: ${{ runner.os }}
- name: Build & deploy Worker
run: pnpm run deploy:testing
env:
NODE_ENV: "production"
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
working-directory: packages/playground-preview-worker
- name: Run tests
run: pnpm run test:e2e
env:
TMP_CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
TMP_CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
NODE_OPTIONS: "--max_old_space_size=8192"
working-directory: packages/playground-preview-worker