commit
3d4ae9c971
3 changed files with 56 additions and 78 deletions
41
.github/workflows/check.yml
vendored
41
.github/workflows/check.yml
vendored
|
|
@ -1,14 +1,20 @@
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
|
# Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
name: check
|
name: check
|
||||||
jobs:
|
jobs:
|
||||||
fmt:
|
fmt:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: stable / fmt
|
name: stable / fmt
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install stable
|
- name: Install stable
|
||||||
|
|
@ -16,19 +22,19 @@ jobs:
|
||||||
with:
|
with:
|
||||||
components: rustfmt
|
components: rustfmt
|
||||||
- name: cargo fmt --check
|
- name: cargo fmt --check
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo fmt --check
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: --check
|
|
||||||
clippy:
|
clippy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: ${{ matrix.toolchain }} / clippy
|
name: ${{ matrix.toolchain }} / clippy
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
checks: write
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
toolchain: [stable, beta]
|
toolchain: [stable, beta]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install ${{ matrix.toolchain }}
|
- name: Install ${{ matrix.toolchain }}
|
||||||
|
|
@ -44,44 +50,39 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: nightly / doc
|
name: nightly / doc
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install nightly
|
- name: Install nightly
|
||||||
uses: dtolnay/rust-toolchain@nightly
|
uses: dtolnay/rust-toolchain@nightly
|
||||||
- name: cargo doc
|
- name: cargo doc
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo doc --no-deps --all-features
|
||||||
with:
|
|
||||||
command: doc
|
|
||||||
args: --no-deps --all-features
|
|
||||||
env:
|
env:
|
||||||
RUSTDOCFLAGS: --cfg docsrs
|
RUSTDOCFLAGS: --cfg docsrs
|
||||||
hack:
|
hack:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: ubuntu / stable / features
|
name: ubuntu / stable / features
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install stable
|
- name: Install stable
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
- name: cargo install cargo-hack
|
- name: cargo install cargo-hack
|
||||||
uses: taiki-e/install-action@cargo-hack
|
uses: taiki-e/install-action@cargo-hack
|
||||||
|
# intentionally no target specifier; see https://github.com/jonhoo/rust-ci-conf/pull/4
|
||||||
- name: cargo hack
|
- name: cargo hack
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo hack --feature-powerset check
|
||||||
with:
|
|
||||||
command: hack
|
|
||||||
args: --feature-powerset check --lib --tests
|
|
||||||
msrv:
|
msrv:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# we use a matrix here just because env can't be used in job names
|
# we use a matrix here just because env can't be used in job names
|
||||||
# https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability
|
# https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
msrv: [1.57.0] # base64 0.21 requires 1.57
|
msrv: ["1.57.0"] # base64 0.21 requires 1.57
|
||||||
name: ubuntu / ${{ matrix.msrv }}
|
name: ubuntu / ${{ matrix.msrv }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install ${{ matrix.msrv }}
|
- name: Install ${{ matrix.msrv }}
|
||||||
|
|
@ -89,6 +90,4 @@ jobs:
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.msrv }}
|
toolchain: ${{ matrix.msrv }}
|
||||||
- name: cargo +${{ matrix.msrv }} check
|
- name: cargo +${{ matrix.msrv }} check
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo check
|
||||||
with:
|
|
||||||
command: check
|
|
||||||
|
|
|
||||||
28
.github/workflows/scheduled.yml
vendored
28
.github/workflows/scheduled.yml
vendored
|
|
@ -1,9 +1,15 @@
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '7 7 * * *'
|
- cron: '7 7 * * *'
|
||||||
|
# Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
name: rolling
|
name: rolling
|
||||||
jobs:
|
jobs:
|
||||||
# https://twitter.com/mycoliza/status/1571295690063753218
|
# https://twitter.com/mycoliza/status/1571295690063753218
|
||||||
|
|
@ -11,21 +17,16 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: ubuntu / nightly
|
name: ubuntu / nightly
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install nightly
|
- name: Install nightly
|
||||||
uses: dtolnay/rust-toolchain@nightly
|
uses: dtolnay/rust-toolchain@nightly
|
||||||
- name: cargo generate-lockfile
|
- name: cargo generate-lockfile
|
||||||
if: hashFiles('Cargo.lock') == ''
|
if: hashFiles('Cargo.lock') == ''
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo generate-lockfile
|
||||||
with:
|
|
||||||
command: generate-lockfile
|
|
||||||
- name: cargo test --locked
|
- name: cargo test --locked
|
||||||
uses: actions-rs/cargo@v1
|
run: caro test --locked --features test-full-imap --all-targets
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --locked --features test-full-imap --all-targets
|
|
||||||
services:
|
services:
|
||||||
cyrus_imapd:
|
cyrus_imapd:
|
||||||
image: outoforder/cyrus-imapd-tester:latest
|
image: outoforder/cyrus-imapd-tester:latest
|
||||||
|
|
@ -43,7 +44,7 @@ jobs:
|
||||||
# Unfortunately, hashFiles only works in if on steps, so we reepeat it.
|
# Unfortunately, hashFiles only works in if on steps, so we reepeat it.
|
||||||
# if: hashFiles('Cargo.lock') != ''
|
# if: hashFiles('Cargo.lock') != ''
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install beta
|
- name: Install beta
|
||||||
|
|
@ -51,15 +52,10 @@ jobs:
|
||||||
uses: dtolnay/rust-toolchain@beta
|
uses: dtolnay/rust-toolchain@beta
|
||||||
- name: cargo update
|
- name: cargo update
|
||||||
if: hashFiles('Cargo.lock') != ''
|
if: hashFiles('Cargo.lock') != ''
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo update
|
||||||
with:
|
|
||||||
command: update
|
|
||||||
- name: cargo test
|
- name: cargo test
|
||||||
if: hashFiles('Cargo.lock') != ''
|
if: hashFiles('Cargo.lock') != ''
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo test --locked --features test-full-imap --all-targets
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --locked --features test-full-imap --all-targets
|
|
||||||
env:
|
env:
|
||||||
RUSTFLAGS: -D deprecated
|
RUSTFLAGS: -D deprecated
|
||||||
services:
|
services:
|
||||||
|
|
|
||||||
65
.github/workflows/test.yml
vendored
65
.github/workflows/test.yml
vendored
|
|
@ -1,7 +1,13 @@
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
|
# Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
name: test
|
name: test
|
||||||
jobs:
|
jobs:
|
||||||
greenmail:
|
greenmail:
|
||||||
|
|
@ -11,7 +17,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
toolchain: [stable, beta]
|
toolchain: [stable, beta]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install ${{ matrix.toolchain }}
|
- name: Install ${{ matrix.toolchain }}
|
||||||
|
|
@ -20,15 +26,10 @@ jobs:
|
||||||
toolchain: ${{ matrix.toolchain }}
|
toolchain: ${{ matrix.toolchain }}
|
||||||
- name: cargo generate-lockfile
|
- name: cargo generate-lockfile
|
||||||
if: hashFiles('Cargo.lock') == ''
|
if: hashFiles('Cargo.lock') == ''
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo generate-lockfile
|
||||||
with:
|
|
||||||
command: generate-lockfile
|
|
||||||
# https://twitter.com/jonhoo/status/1571290371124260865
|
# https://twitter.com/jonhoo/status/1571290371124260865
|
||||||
- name: cargo test --locked
|
- name: cargo test --locked
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo test --locked --all-targets
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --locked --all-targets
|
|
||||||
services:
|
services:
|
||||||
greenmail:
|
greenmail:
|
||||||
image: greenmail/standalone:1.6.8
|
image: greenmail/standalone:1.6.8
|
||||||
|
|
@ -48,26 +49,22 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
toolchain: [stable, beta]
|
toolchain: [stable, beta]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install ${{ matrix.toolchain }}
|
- name: Install ${{ matrix.toolchain }}
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
|
||||||
toolchain: ${{ matrix.toolchain }}
|
toolchain: ${{ matrix.toolchain }}
|
||||||
default: true
|
|
||||||
- name: cargo generate-lockfile
|
- name: cargo generate-lockfile
|
||||||
if: hashFiles('Cargo.lock') == ''
|
if: hashFiles('Cargo.lock') == ''
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo generate-lockfile
|
||||||
with:
|
|
||||||
command: generate-lockfile
|
|
||||||
# https://twitter.com/jonhoo/status/1571290371124260865
|
# https://twitter.com/jonhoo/status/1571290371124260865
|
||||||
- name: cargo test --locked
|
- name: cargo test --locked
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo test --locked --features test-full-imap --all-targets
|
||||||
with:
|
# https://github.com/rust-lang/cargo/issues/6669
|
||||||
command: test
|
- name: cargo test --doc
|
||||||
args: --locked --features test-full-imap --all-targets
|
run: cargo test --locked --all-features --doc
|
||||||
services:
|
services:
|
||||||
cyrus_imapd:
|
cyrus_imapd:
|
||||||
image: outoforder/cyrus-imapd-tester:latest
|
image: outoforder/cyrus-imapd-tester:latest
|
||||||
|
|
@ -80,7 +77,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: ubuntu / stable / minimal-versions
|
name: ubuntu / stable / minimal-versions
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install stable
|
- name: Install stable
|
||||||
|
|
@ -90,16 +87,9 @@ jobs:
|
||||||
- name: rustup default stable
|
- name: rustup default stable
|
||||||
run: rustup default stable
|
run: rustup default stable
|
||||||
- name: cargo update -Zminimal-versions
|
- name: cargo update -Zminimal-versions
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo +nightly update -Zminimal-versions
|
||||||
with:
|
|
||||||
command: update
|
|
||||||
toolchain: nightly
|
|
||||||
args: -Zminimal-versions
|
|
||||||
- name: cargo test
|
- name: cargo test
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo test --locked --features test-full-imap --all-targets
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --locked --features test-full-imap --all-targets
|
|
||||||
services:
|
services:
|
||||||
cyrus_imapd:
|
cyrus_imapd:
|
||||||
image: outoforder/cyrus-imapd-tester:latest
|
image: outoforder/cyrus-imapd-tester:latest
|
||||||
|
|
@ -120,26 +110,21 @@ jobs:
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
- run: vcpkg install openssl:x64-windows-static-md
|
- run: vcpkg install openssl:x64-windows-static-md
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install stable
|
- name: Install stable
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
- name: cargo generate-lockfile
|
- name: cargo generate-lockfile
|
||||||
if: hashFiles('Cargo.lock') == ''
|
if: hashFiles('Cargo.lock') == ''
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo generate-lockfile
|
||||||
with:
|
|
||||||
command: generate-lockfile
|
|
||||||
- name: cargo check
|
- name: cargo check
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo check --locked --all-features --all-targets
|
||||||
with:
|
|
||||||
command: check
|
|
||||||
args: --locked --all-features --all-targets
|
|
||||||
coverage:
|
coverage:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: ubuntu / stable / coverage
|
name: ubuntu / stable / coverage
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install stable
|
- name: Install stable
|
||||||
|
|
@ -150,9 +135,7 @@ jobs:
|
||||||
uses: taiki-e/install-action@cargo-llvm-cov
|
uses: taiki-e/install-action@cargo-llvm-cov
|
||||||
- name: cargo generate-lockfile
|
- name: cargo generate-lockfile
|
||||||
if: hashFiles('Cargo.lock') == ''
|
if: hashFiles('Cargo.lock') == ''
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo generate-lockfile
|
||||||
with:
|
|
||||||
command: generate-lockfile
|
|
||||||
- name: cargo llvm-cov
|
- name: cargo llvm-cov
|
||||||
run: cargo llvm-cov --features test-full-imap --lcov --output-path lcov.info
|
run: cargo llvm-cov --features test-full-imap --lcov --output-path lcov.info
|
||||||
- name: Upload to codecov.io
|
- name: Upload to codecov.io
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue