Fix/auto detect language #287
Workflow file for this run
This file contains 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: | |
- master | |
- main | |
- develop | |
- staging | |
pull_request: | |
branches: | |
- master | |
- main | |
- develop | |
- staging | |
jobs: | |
E2E: | |
name: Playwright E2E Tests | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
env: | |
NEXT_PUBLIC_BASE_URL: http://localhost:3000 | |
NEXT_PUBLIC_ENV_NAME: tests | |
DATABASE_URL: postgres://startui:startui@localhost:5432/startui | |
NEXT_PUBLIC_IS_DEMO: false | |
AUTH_SECRET: Replace me with `openssl rand -base64 32` generated secret | |
EMAIL_SERVER: smtp://username:password@localhost:1025 | |
EMAIL_FROM: Start UI <noreply@example.com> | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: startui | |
POSTGRES_USER: startui | |
POSTGRES_DB: startui | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
version: 9 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store-${{ env.cache-name }}- | |
${{ runner.os }}-pnpm-store- | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Install Playwright Browsers | |
run: pnpm playwright install --with-deps | |
- name: Migrate database | |
run: pnpm db:push | |
- name: Add default data into database | |
run: pnpm db:seed | |
- name: Run Playwright tests | |
run: pnpm e2e | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |