mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 12:56:30 +01:00
Testing github alternative action for postgres
This commit is contained in:
parent
86c65b08d7
commit
094478c337
2 changed files with 23 additions and 5 deletions
19
.github/workflows/github_action_test_suite.yml
vendored
19
.github/workflows/github_action_test_suite.yml
vendored
|
|
@ -32,10 +32,26 @@ jobs:
|
|||
UNIT_TEST_SETTINGS: "--settings=settings --keepdb --timing"
|
||||
COVERAGE_TEST_SETTINGS: "--settings=settings --timing"
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:12
|
||||
env:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: evennia
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5s
|
||||
ports:
|
||||
- 5432:5432
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up database (${{ matrix.TESTING_DB }})
|
||||
if: matrix.TESTING_DB != 'postgresql'
|
||||
uses: ./.github/actions/setup-database
|
||||
with:
|
||||
database: ${{ matrix.TESTING_DB }}
|
||||
|
|
@ -74,6 +90,9 @@ jobs:
|
|||
working-directory: testing_mygame
|
||||
run: |
|
||||
evennia test ${{ env.UNIT_TEST_SETTINGS }} evennia
|
||||
env:
|
||||
POSTGRES_HOST: localhost
|
||||
POSTGRES_PORT: 5432
|
||||
|
||||
# OBS - it's important to not run the coverage tests with --parallel, it messes up the coverage
|
||||
# calculation!
|
||||
|
|
|
|||
9
.github/workflows/postgresql_settings.py
vendored
9
.github/workflows/postgresql_settings.py
vendored
|
|
@ -42,11 +42,10 @@ DATABASES = {
|
|||
"default": {
|
||||
"ENGINE": "django.db.backends.postgresql",
|
||||
"NAME": "evennia",
|
||||
"USER": "evennia",
|
||||
"PASSWORD": "password",
|
||||
"HOST": "localhost",
|
||||
"PORT": "", # use default
|
||||
"TEST": {"NAME": "default"},
|
||||
"USER": "postgresql", # evennia
|
||||
"PASSWORD": "postgres",
|
||||
"HOST": os.environ.get("POSTGRES_HOST", "localhost"),
|
||||
"PORT": os.environ.get("POSTGRES_PORT", "5432"),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue