ci: run tests with and without MongoDB

This commit is contained in:
Paul Makles
2023-04-22 16:03:08 +01:00
parent a9c82791b3
commit 736220a94e

View File

@@ -32,16 +32,23 @@ jobs:
with:
command: test
- name: Copy .env.example
if: github.event_name != 'pull_request'
run: |
cp .env.example .env
- name: Run services in background
if: github.event_name != 'pull_request'
run: |
docker-compose -f docker-compose.db.yml up -d
- name: Run cargo test (with MongoDB)
uses: actions-rs/cargo@v1
env:
MONGODB: mongodb://localhost
with:
command: test
- name: Copy .env.example
if: github.event_name != 'pull_request'
run: |
cp .env.example .env
- name: Start API in background
if: github.event_name != 'pull_request'
run: |