Merge pull request #50 from SelfSend/21-deploy-openapi-docs Closes #21 #69
This file contains hidden or 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: CI | |
| on: [push, pull_request] | |
| jobs: | |
| basic-checks: | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: "-C instrument-coverage" | |
| LLVM_PROFILE_FILE: "cargo-test-%p-%m.profraw" | |
| MONGODB_URI: ${{ secrets.MONGODB_URI }} | |
| DB_NAME_TEST: ${{ secrets.DB_NAME_TEST }} | |
| DB_NAME_PRODUCTION: ${{ secrets.DB_NAME_PRODUCTION }} | |
| DB_DISPOSABLE_EMAILS_COLLECTION: ${{ secrets.DB_DISPOSABLE_EMAILS_COLLECTION }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust and coverage tools | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: llvm-tools-preview | |
| - name: Install grcov | |
| run: cargo install grcov | |
| - name: Cache dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Build Project | |
| run: cargo build --verbose | |
| - name: Run Tests with Coverage | |
| run: | | |
| cargo test --verbose | |
| # Generate coverage report | |
| grcov . --binary-path ./target/debug/ -s . -t lcov -o ./coverage.lcov | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: coverage.lcov | |
| - name: Check Formatting | |
| run: cargo fmt --all -- --check | |
| - name: Lint with Clippy | |
| run: cargo clippy -- -D warnings |