feat(dev): auto-manage PostgreSQL and NATS for local development #979
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: E2E Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| e2e: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: apps/mesh | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install | |
| working-directory: . | |
| - name: Cache Playwright browsers | |
| id: cache-playwright | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ hashFiles('apps/mesh/package.json') }} | |
| - name: Install Playwright browsers | |
| if: steps.cache-playwright.outputs.cache-hit != 'true' | |
| run: npx playwright install chromium --with-deps | |
| - name: Install Playwright system deps | |
| if: steps.cache-playwright.outputs.cache-hit == 'true' | |
| run: npx playwright install-deps chromium | |
| - name: Write CI auth config | |
| run: | | |
| echo '{"emailAndPassword":{"enabled":true},"socialProviders":{},"saml":{"enabled":false,"providers":[]},"emailProviders":[],"magicLinkConfig":{"enabled":false}}' > auth-config.json | |
| - name: Create data directory | |
| run: mkdir -p data | |
| - name: Run database migrations | |
| run: bun run migrate | |
| - name: Run e2e tests | |
| run: bun run test:e2e |