Skip to content

chore(workflows): fix Mongo instance replication #397

chore(workflows): fix Mongo instance replication

chore(workflows): fix Mongo instance replication #397

name: branch-protection
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo clippy --no-deps -- -D warnings
test:
runs-on: ubuntu-latest
env:
- DATABASE_URL: "mongodb://localhost:27017/simple_budget?retryWrites=true&w=majority&directConnection=true"

Check failure on line 12 in .github/workflows/branch-protection.yaml

View workflow run for this annotation

GitHub Actions / branch-protection

Invalid workflow file

The workflow is not valid. .github/workflows/branch-protection.yaml (Line: 12, Col: 7): A sequence was not expected
steps:
- run: docker run -d -p 27017:27017 mongo:8.0.0 --replSet rs0
- uses: actions/checkout@v4
- run: docker exec -ti mongo mongosh --eval "rs.initiate()"
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: cargo test