Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Ley
synapse
Commits
2506dd76
Unverified
Commit
2506dd76
authored
2 years ago
by
realtyem
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Unit tests CI speedup (#14610)
parent
be3a8a85
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.github/workflows/tests.yml
+7
-3
7 additions, 3 deletions
.github/workflows/tests.yml
changelog.d/14610.misc
+1
-0
1 addition, 0 deletions
changelog.d/14610.misc
with
8 additions
and
3 deletions
.github/workflows/tests.yml
+
7
−
3
View file @
2506dd76
...
...
@@ -197,8 +197,12 @@ jobs:
-
run
:
sudo apt-get -qq install xmlsec1
-
name
:
Set up PostgreSQL ${{ matrix.job.postgres-version }}
if
:
${{ matrix.job.postgres-version }}
# 1. Mount postgres data files onto a tmpfs in-memory filesystem to reduce overhead of docker's overlayfs layer.
# 2. Expose the unix socket for postgres. This removes latency of using docker-proxy for connections.
run
:
|
docker run -d -p 5432:5432 \
--tmpfs /var/lib/postgres:rw,size=6144m \
--mount 'type=bind,src=/var/run/postgresql,dst=/var/run/postgresql' \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_INITDB_ARGS="--lc-collate C --lc-ctype C --encoding UTF8" \
postgres:${{ matrix.job.postgres-version }}
...
...
@@ -220,10 +224,10 @@ jobs:
if
:
${{ matrix.job.postgres-version }}
timeout-minutes
:
2
run
:
until pg_isready -h localhost; do sleep 1; done
-
run
:
poetry run trial --jobs=
2
tests
-
run
:
poetry run trial --jobs=
6
tests
env
:
SYNAPSE_POSTGRES
:
${{ matrix.job.database == 'postgres' || '' }}
SYNAPSE_POSTGRES_HOST
:
localhost
SYNAPSE_POSTGRES_HOST
:
/var/run/postgresql
SYNAPSE_POSTGRES_USER
:
postgres
SYNAPSE_POSTGRES_PASSWORD
:
postgres
-
name
:
Dump logs
...
...
@@ -292,7 +296,7 @@ jobs:
python-version
:
'
3.7'
extras
:
"
all
test"
-
run
:
poetry run trial -j
2
tests
-
run
:
poetry run trial -j
6
tests
-
name
:
Dump logs
# Logs are most useful when the command fails, always include them.
if
:
${{ always() }}
...
...
This diff is collapsed.
Click to expand it.
changelog.d/14610.misc
0 → 100644
+
1
−
0
View file @
2506dd76
Alter some unit test environment parameters to decrease time spent running tests.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment