chore: fix linting errors #469
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |