Skip to content

Commit

Permalink
build: include service of mongodb to run the application and test
Browse files Browse the repository at this point in the history
  • Loading branch information
ViniciusGomes committed Jan 16, 2024
1 parent bc69e2c commit dbc0387
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,24 @@ env:

jobs:
build:

runs-on: ubuntu-latest

services:
mongodb:
image: mongo:latest
ports:
- 27017:27017
options: >-
--health-cmd 'mongo --eval "db.runCommand({ ping: 1 })" --quiet'
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
env:
MONGO_URL: mongodb://localhost:27017
run: cargo test --verbose

0 comments on commit dbc0387

Please sign in to comment.