Skip to content

Merge pull request #2404 from flow-php/flow-to-postgresql-schema #1823

Merge pull request #2404 from flow-php/flow-to-postgresql-schema

Merge pull request #2404 from flow-php/flow-to-postgresql-schema #1823

Workflow file for this run

on:
pull_request:
paths:
- 'web/**'
push:
branches: [ 1.x ]
paths:
- 'web/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
website-tests:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
php-version:
- "8.3"
operating-system:
- "ubuntu-latest"
steps:
- name: "Checkout"
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
fetch-depth: 0
persist-credentials: false
- name: "Get Flow Version"
id: flow_version
uses: WyriHaximus/github-action-get-previous-tag@04e8485ecb6487243907e330d522ff60f02283ce # v1
with:
fallback: 1.x-dev
- name: "Setup PHP Environment"
uses: "./.github/actions/setup-php-env"
with:
php-version: "${{ matrix.php-version }}"
dependencies: "locked"
coverage: "pcov"
working-directory: "web/landing"
cache-key-suffix: "-website"
composer-file: "web/landing/composer.lock"
- name: "Setup Node.js"
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
- name: "Setup Chrome"
id: chrome
uses: browser-actions/setup-chrome@2e1d749697dd1612b833dba4a722266286fbefcd # v2
with:
chrome-version: "stable"
install-chromedriver: true
- name: "Create Wrangler dev.vars"
run: |
cat > .dev.vars << EOF
TURNSTILE_SECRET_KEY=dummy
TURNSTILE_MODE=bypass
ENABLE_R2_PROXY=true
RATE_LIMITER_MODE=bypass
EOF
working-directory: "terraform/cloudflare/workers"
- name: "Start Wrangler in background"
run: |
npx wrangler@latest dev --port 8787 > wrangler.log 2>&1 &
echo $! > wrangler.pid
# Wait for wrangler to be ready
timeout 30 bash -c 'until curl -s http://localhost:8787 > /dev/null; do sleep 1; done'
working-directory: "terraform/cloudflare/workers"
- name: "Test"
run: "composer test"
working-directory: "web/landing"
env:
PLAYGROUND_API_URL: "http://localhost:8787/api/playground/snippets"
PLAYGROUND_SNIPPETS_URL: "http://localhost:8787"
PANTHER_CHROME_BINARY: ${{ steps.chrome.outputs.chrome-path }}
PANTHER_CHROME_DRIVER_BINARY: ${{ steps.chrome.outputs.chromedriver-path }}
- name: "Stop Wrangler"
if: always()
run: |
if [ -f wrangler.pid ]; then
kill "$(cat wrangler.pid)" || true
fi
if [ -f wrangler.log ]; then
echo "=== Wrangler Logs ==="
cat wrangler.log
fi
working-directory: "terraform/cloudflare/workers"
- name: "Test Build"
run: "composer build"
working-directory: "web/landing"
env:
SCHEME: https
DOMAIN: flow-php.com
FLOW_VERSION: ${{ steps.flow_version.outputs.tag }}