Skip to content

Fix admin user management flows #2051

Fix admin user management flows

Fix admin user management flows #2051

Workflow file for this run

name: 'End-to-end tests'
on:
pull_request:
types: [opened, reopened, synchronize]
branches:
- '**'
jobs:
e2e_tests:
name: 'End-to-end tests'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Create env-files
env:
GEONAMES_USERNAME: ${{ secrets.GEONAMES_USERNAME }}
run: GEONAMES_USERNAME=$GEONAMES_USERNAME npm run config
- name: Install root dependencies
run: npm ci
- name: 'Start containers'
run: npm run start:anon -- --wait -d
- name: Wait for MariaDB
run: |
container_id=$(docker compose --file docker-compose.anon.yml ps -q db-anon)
if [ -z "$container_id" ]; then
echo "db-anon container not found"
exit 1
fi
for i in {1..30}; do
status=$(docker inspect --format='{{.State.Health.Status}}' "$container_id" 2>/dev/null || echo "starting")
if [ "$status" = "healthy" ]; then
echo "MariaDB is healthy"
exit 0
fi
echo "Waiting for MariaDB (attempt ${i}) - status: $status"
sleep 2
done
echo "MariaDB did not become ready in time"
docker compose --file docker-compose.anon.yml logs db-anon --tail=200
exit 1
- name: Run e2e tests
uses: cypress-io/github-action@v6
with:
browser: chrome
- name: Dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2