Skip to content

Fix image loading in OpenSeadragon #99

Fix image loading in OpenSeadragon

Fix image loading in OpenSeadragon #99

name: Playwright Tests
on:
push:
branches: [master, main, development]
pull_request:
branches: [master, main, development]
jobs:
test:
timeout-minutes: 20
runs-on: ubuntu-latest
services:
postgres:
image: postgis/postgis:13-3.1
env:
POSTGRES_DB: mmgis_test
POSTGRES_USER: test_user
POSTGRES_PASSWORD: test_password
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Setup test environment
run: |
cp sample.env .env || touch .env
echo "NODE_ENV=test" >> .env
echo "PORT=8888" >> .env
echo "AUTH=off" >> .env
echo "DB_HOST=localhost" >> .env
echo "DB_PORT=5432" >> .env
echo "DB_NAME=mmgis_test" >> .env
echo "DB_USER=test_user" >> .env
echo "DB_PASS=test_password" >> .env
echo "ENABLE_MMGIS_WEBSOCKETS=false" >> .env
echo "ENABLE_CONFIG_WEBSOCKETS=false" >> .env
echo "HIDE_CONFIG=true" >> .env
- name: Initialize Database
run: node scripts/init-db.js
- name: Run Unit Tests
run: npx playwright test tests/unit --project=chromium
- name: Run E2E Tests
run: npx playwright test tests/e2e --project=chromium
continue-on-error: true
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: test-results/
retention-days: 7