Skip to content

feat(models): move create/update into models (#250) #461

feat(models): move create/update into models (#250)

feat(models): move create/update into models (#250) #461

name: branch-protection
on:
push:
branches-ignore:
- main
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"
steps:
- run: docker run --name mongo -d -p 27017:27017 mongo:8.0.0 --replSet rs0
- uses: actions/checkout@v4
- run: docker exec 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