Update dns-lookup requirement from 1 to 2 #21
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: build | |
on: [push, pull_request] | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
rust-toolchain: [stable, nightly] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust-toolchain }} | |
components: clippy, rustfmt | |
override: true | |
- name: Verify versions | |
run: rustc --version && rustup --version && cargo --version | |
- name: Cache build artifacts | |
id: cache-cargo | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ matrix.rust-toolchain }} | |
- name: Test code with default features | |
run: cargo test | |
- name: Check code with only `tokio-dns-resolver` and `google` features enabled. | |
run: cargo check --no-default-features --features tokio-dns-resolver,google | |
- name: Check code with only `tokio-http-resolver` and `google` features enabled. | |
run: cargo check --no-default-features --features tokio-http-resolver,google | |
- name: Lint code | |
if: ${{ matrix.rust-toolchain == 'stable' }} | |
run: cargo fmt -- --check && cargo clippy --all-features |