Add global sandbox mode to the mail client #20
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: Rust CI Flow | |
on: | |
push: | |
branches: [ "main", "devel" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: Enforce formatting | |
run: cargo fmt --check | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
- name: Linting | |
run: cargo clippy --no-deps -- -D warnings | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
needs: [clippy, fmt] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install tarpaulin | |
run: cargo install cargo-tarpaulin | |
- name: Tests | |
run: cargo test | |
env: | |
MAILJET_API_KEY: ${{ secrets.MAILJET_API_KEY }} | |
MAILJET_API_USER: ${{ secrets.MAILJET_API_USER }} | |
MAILJET_FROM_EMAIL: ${{ vars.MAILJET_FROM_EMAIL }} | |
- name: Generate code coverage | |
run: cargo tarpaulin --verbose --all-features --timeout 120 --out xml | |
env: | |
MAILJET_API_KEY: ${{ secrets.MAILJET_API_KEY }} | |
MAILJET_API_USER: ${{ secrets.MAILJET_API_USER }} | |
MAILJET_FROM_EMAIL: ${{ vars.MAILJET_FROM_EMAIL }} | |
- name: Upload coverage to codecov.io | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true |