Sync AWS PRs and add coding guidelines #32
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Local E2E Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | |
| PLAYWRIGHT_BROWSERS_PATH: 0 | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| jobs: | |
| core: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| - name: Setup Playwright | |
| uses: ./.github/actions/setup-playwright | |
| - name: Build OpenNext packages | |
| shell: bash | |
| run: pnpm --filter @opennextjs/aws... run build | |
| - name: Build examples apps with local configuration | |
| shell: bash | |
| run: pnpm -r openbuild:local | |
| # Remember to add more ports here if we add new examples app | |
| - name: Start the local OpenNext servers | |
| shell: bash | |
| run: | | |
| pnpm -r openbuild:local:start & | |
| for port in 3001 3002 3003; do | |
| echo "Checking port $port..." | |
| for attempt in {1..20}; do | |
| sleep 0.5 | |
| if curl --silent --fail http://localhost:$port > /dev/null; then | |
| echo "Server on $port is ready" | |
| break | |
| fi | |
| if [ $attempt -eq 20 ]; then | |
| echo "Server on $port failed to start" | |
| exit 1 | |
| fi | |
| echo "Waiting for server on $port, attempt $attempt..." | |
| done | |
| done | |
| - name: Run E2E Test locally | |
| shell: bash | |
| run: | | |
| pnpm e2e:test | |
| cloudflare: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| - name: Setup Playwright | |
| uses: ./.github/actions/setup-playwright | |
| - name: Build OpenNext packages | |
| shell: bash | |
| run: pnpm --filter @opennextjs/cloudflare run build | |
| - name: Build worker with local configuration | |
| shell: bash | |
| run: pnpm turbo build:worker:cf | |
| - name: Run E2E Test in Cloudflare Environment | |
| shell: bash | |
| run: pnpm turbo e2e:cf |