Skip to content

resolve #806: forbid empty forward path when deserializing address::Envelop #1269

resolve #806: forbid empty forward path when deserializing address::Envelop

resolve #806: forbid empty forward path when deserializing address::Envelop #1269

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- master
env:
RUSTFLAGS: "--cfg lettre_ignore_tls_mismatch"
RUSTDOCFLAGS: "--cfg lettre_ignore_tls_mismatch"
RUST_BACKTRACE: full
jobs:
rustfmt:
name: rustfmt / nightly-2023-06-22
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install rust
run: |
rustup default nightly-2023-06-22
rustup component add rustfmt
- name: cargo fmt
run: cargo fmt --all -- --check
clippy:
name: clippy / stable
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install rust
run: |
rustup update --no-self-update stable
rustup component add clippy
- name: Run clippy
run: cargo clippy --all-features --all-targets -- -D warnings
check:
name: check / stable
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install rust
run: rustup update --no-self-update stable
- name: Setup cache
uses: Swatinem/rust-cache@v2
- name: Install cargo hack
run: cargo install cargo-hack --debug
- name: Check with cargo hack
run: cargo hack check --feature-powerset --depth 3
test:
name: test / ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: stable
rust: stable
- name: beta
rust: beta
- name: '1.70'
rust: '1.70'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install rust
run: |
rustup default ${{ matrix.rust }}
rustup update --no-self-update ${{ matrix.rust }}
- name: Setup cache
uses: Swatinem/rust-cache@v2
- name: Install postfix
run: |
DEBIAN_FRONTEND=noninteractive sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get -y install postfix
- name: Run SMTP server
run: smtp-sink 2525 1000&
- name: Install coredns
run: |
wget -q https://github.com/coredns/coredns/releases/download/v1.8.6/coredns_1.8.6_linux_amd64.tgz
tar xzf coredns_1.8.6_linux_amd64.tgz
- name: Start coredns
run: |
sudo ./coredns -conf testdata/coredns.conf &
sudo systemctl stop systemd-resolved
echo "nameserver 127.0.0.54" | sudo tee /etc/resolv.conf
- name: Install dkimverify
run: sudo apt -y install python3-dkim
- name: Work around early dependencies MSRV bump
run: |
cargo update -p anstyle --precise 1.0.2
cargo update -p clap --precise 4.3.24
cargo update -p clap_lex --precise 0.5.0
- name: Test with no default features
run: cargo test --no-default-features
- name: Test with default features
run: cargo test
- name: Test with all features (-native-tls)
run: cargo test --no-default-features --features async-std1,async-std1-rustls-tls,boring-tls,builder,dkim,file-transport,file-transport-envelope,hostname,mime03,pool,rustls-native-certs,rustls-tls,sendmail-transport,smtp-transport,tokio1,tokio1-boring-tls,tokio1-rustls-tls,tracing
- name: Test with all features (-boring-tls)
run: cargo test --no-default-features --features async-std1,async-std1-rustls-tls,builder,dkim,file-transport,file-transport-envelope,hostname,mime03,native-tls,pool,rustls-native-certs,rustls-tls,sendmail-transport,smtp-transport,tokio1,tokio1-native-tls,tokio1-rustls-tls,tracing
# coverage:
# name: Coverage
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions-rs/toolchain@v1
# with:
# toolchain: nightly
# override: true
# - run: sudo DEBIAN_FRONTEND=noninteractive apt-get -y install postfix
# - run: smtp-sink 2525 1000&
# - uses: actions-rs/cargo@v1
# with:
# command: test
# args: --no-fail-fast
# env:
# CARGO_INCREMENTAL: "0"
# RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads"
# - id: coverage
# uses: actions-rs/grcov@v0.1
# - name: Coveralls upload
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# path-to-lcov: ${{ steps.coverage.outputs.report }}