Skip to content

Commit

Permalink
ci(cypress): use pre-seeded image
Browse files Browse the repository at this point in the history
  • Loading branch information
ismay committed Mar 20, 2023
1 parent 7e5e595 commit 5670394
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/dhis2-verify-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
- name: End-to-End tests
uses: cypress-io/github-action@v5
with:
start: npx --yes @dhis2/cli-cluster up 2.40 --channel dev --db-version 2.40 --seed, yarn start:nobrowser
start: docker compose up, yarn start:nobrowser
wait-on: 'http://localhost:8080/dhis-web-commons/security/login.action, http://localhost:3000'
wait-on-timeout: 600
record: true
Expand Down
14 changes: 14 additions & 0 deletions dhis.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
connection.dialect = org.hibernate.dialect.PostgreSQLDialect
connection.driver_class = org.postgresql.Driver
connection.url = jdbc:postgresql://db/dhis2
connection.username = dhis
connection.password = dhis
# Database schema behavior, can be validate, update, create, create-drop
connection.schema = update

# encryption.password = xxxx
metadata.audit.persist = on

# URLs for specifying a custom app hub, these are the defaults
#apphub.base.url = https://apps.dhis2.org
#apphub.api.url = https://apps.dhis2.org/api
23 changes: 23 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: "3.8"

services:
web:
image: dhis2/core:2.39.1
ports:
- 127.0.0.1:8080:8080 # DHIS2
volumes:
- ./dhis.conf:/opt/dhis2/dhis.conf:ro
depends_on:
db:
condition: service_healthy

db:
image: radnov/dhis2-sl-db:2.39.1
ports:
- 127.0.0.1:5432:5432
healthcheck:
test: ["CMD-SHELL", "PGPASSWORD=dhis psql --no-password --quiet --username dhis postgres://127.0.0.1/dhis2 -p 5432 --command \"SELECT 'ok'\" > /dev/null"]
start_period: 30s
interval: 1s
timeout: 3s
retries: 5

0 comments on commit 5670394

Please sign in to comment.