Skip to content

Commit 78595d8

Browse files
CBenoitCopilot
andcommitted
ci: run MongoDB integration tests
Run the ignored integration tests against a MongoDB 7 service container on Linux. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent ea9c14a commit 78595d8

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,39 @@ jobs:
6464
- name: Tests
6565
run: cargo test --workspace -v
6666

67+
integration-tests:
68+
name: MongoDB integration tests
69+
runs-on: ubuntu-22.04
70+
needs: formatting
71+
72+
services:
73+
mongodb:
74+
image: mongo:7.0
75+
ports:
76+
- 27017:27017
77+
options: >-
78+
--health-cmd "mongosh --quiet --eval 'db.runCommand({ ping: 1 }).ok'"
79+
--health-interval 5s
80+
--health-timeout 5s
81+
--health-retries 10
82+
83+
steps:
84+
- uses: actions/checkout@v6
85+
86+
- name: Rust cache
87+
uses: Swatinem/rust-cache@v2.7.3
88+
89+
- name: Integration tests
90+
run: cargo test --workspace --tests -v -- --ignored --test-threads=1
91+
6792
success:
6893
name: Success
6994
runs-on: ubuntu-latest
7095
if: ${{ always() }}
7196
needs:
7297
- formatting
7398
- checks
99+
- integration-tests
74100

75101
steps:
76102
- name: CI succeeded

0 commit comments

Comments
 (0)