first commit
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
name: E2E Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [dev, main]
|
||||
|
||||
jobs:
|
||||
e2e-test:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.0.39
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: userfeedback
|
||||
MYSQL_DATABASE: e2e
|
||||
MYSQL_USER: userfeedback
|
||||
MYSQL_PASSWORD: userfeedback
|
||||
TZ: UTC
|
||||
ports:
|
||||
- 13307:3306
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||
smtp:
|
||||
image: rnwood/smtp4dev:v3
|
||||
ports:
|
||||
- 5080:80
|
||||
- 25:25
|
||||
- 143:143
|
||||
opensearch:
|
||||
image: opensearchproject/opensearch:2.4.1
|
||||
env:
|
||||
discovery.type: single-node
|
||||
bootstrap.memory_lock: 'true'
|
||||
plugins.security.disabled: 'true'
|
||||
options: >-
|
||||
--health-cmd="curl -s http://localhost:9200/_cluster/health | grep -q '\"status\":\"green\"'"
|
||||
--health-interval=10s
|
||||
--health-timeout=5s
|
||||
--health-retries=3
|
||||
ports:
|
||||
- 9200:9200
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Setup
|
||||
uses: ./tooling/github/setup
|
||||
|
||||
- name: Cache Playwright browsers
|
||||
uses: actions/cache@v3
|
||||
id: playwright-cache
|
||||
with:
|
||||
path: ~/.cache/ms-playwright
|
||||
key: ${{ runner.os }}-playwright-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
|
||||
- name: Install Playwright Browsers
|
||||
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||
run: pnpm exec playwright install --with-deps chromium
|
||||
|
||||
- name: Run e2e tests
|
||||
run: |
|
||||
CI=true pnpm test:e2e
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always() && !cancelled()
|
||||
with:
|
||||
name: playwright-report
|
||||
path: apps/e2e/playwright-report/
|
||||
retention-days: 7
|
||||
Reference in New Issue
Block a user