mirror of
https://github.com/matrix-org/synapse.git
synced 2025-01-27 10:29:19 +00:00
Support running tests in CI.
This commit is contained in:
parent
ff40f22a23
commit
7b82cba4bc
@ -50,23 +50,38 @@ if not IS_PR:
|
|||||||
for version in ("3.9", "3.10", "3.11", "3.12")
|
for version in ("3.9", "3.10", "3.11", "3.12")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Run with both psycopg2 and psycopg.
|
||||||
trial_postgres_tests = [
|
trial_postgres_tests = [
|
||||||
{
|
{
|
||||||
"python-version": "3.8",
|
"python-version": "3.8",
|
||||||
"database": "postgres",
|
"database": "postgres",
|
||||||
"postgres-version": "11",
|
"postgres-version": "11",
|
||||||
"extras": "all",
|
"extras": "all",
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"python-version": "3.8",
|
||||||
|
"database": "psycopg",
|
||||||
|
"postgres-version": "11",
|
||||||
|
"extras": "all",
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
if not IS_PR:
|
if not IS_PR:
|
||||||
trial_postgres_tests.append(
|
trial_postgres_tests.extend(
|
||||||
{
|
[
|
||||||
"python-version": "3.12",
|
{
|
||||||
"database": "postgres",
|
"python-version": "3.12",
|
||||||
"postgres-version": "16",
|
"database": "postgres",
|
||||||
"extras": "all",
|
"postgres-version": "16",
|
||||||
}
|
"extras": "all",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"python-version": "3.12",
|
||||||
|
"database": "psycopg",
|
||||||
|
"postgres-version": "16",
|
||||||
|
"extras": "all",
|
||||||
|
},
|
||||||
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
trial_no_extra_tests = [
|
trial_no_extra_tests = [
|
||||||
|
4
.github/workflows/tests.yml
vendored
4
.github/workflows/tests.yml
vendored
@ -346,7 +346,9 @@ jobs:
|
|||||||
run: until pg_isready -h localhost; do sleep 1; done
|
run: until pg_isready -h localhost; do sleep 1; done
|
||||||
- run: poetry run trial --jobs=6 tests
|
- run: poetry run trial --jobs=6 tests
|
||||||
env:
|
env:
|
||||||
SYNAPSE_POSTGRES: ${{ matrix.job.database == 'postgres' || '' }}
|
# If matrix.job.database is 'psycopg' set SYNAPSE_POSTGRES to that string;
|
||||||
|
# otherwise if it is 'postgres' set it to true. Otherwise, empty.
|
||||||
|
SYNAPSE_POSTGRES: ${{ matrix.job.database == 'psycopg' && 'psycopg' || matrix.job.database == 'postgres' || '' }}
|
||||||
SYNAPSE_POSTGRES_HOST: /var/run/postgresql
|
SYNAPSE_POSTGRES_HOST: /var/run/postgresql
|
||||||
SYNAPSE_POSTGRES_USER: postgres
|
SYNAPSE_POSTGRES_USER: postgres
|
||||||
SYNAPSE_POSTGRES_PASSWORD: postgres
|
SYNAPSE_POSTGRES_PASSWORD: postgres
|
||||||
|
Loading…
Reference in New Issue
Block a user