diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index c7f57608..cad2a73f 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -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: |