Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[test-groups]
database = { max-threads = 1 }

[profile.default]
retries = 1

# sqlx has a problem with nextest, as it uses a process-local semaphore to have
# tests use different databases. This doesn't work with nextest, as it has a
# process-per-test model, which is why we need to make sure only one test uses
# the database at a time.
# See https://github.com/launchbadge/sqlx/pull/3334
[[profile.default.overrides]]
filter = 'package(mas-handlers) or package(mas-storage-pg)'
test-group = 'database'
10 changes: 4 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ jobs:

strategy:
matrix:
partition: [1, 2]
partition: [1, 2, 3]

services:
postgres:
Expand Down Expand Up @@ -350,11 +350,9 @@ jobs:
env:
DATABASE_URL: postgresql://postgres:postgres@localhost/postgres
run: |
~/.cargo/bin/cargo-nextest nextest run --archive-file nextest-archive.tar.zst \
--partition count:${{ matrix.partition }}/2 \
--retries 1
# --retries is a workaround for sqlx not playing nice with nextest
# Waiting for https://github.com/launchbadge/sqlx/pull/3334
~/.cargo/bin/cargo-nextest nextest run \
--archive-file nextest-archive.tar.zst \
--partition count:${{ matrix.partition }}/3

syn2mas:
name: Check syn2mas
Expand Down
Loading