[LLT-4202] Make lookup return error in case of failure on forward #11
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: test | |
on: | |
push: | |
branches: | |
- main | |
- release/** | |
pull_request: | |
branches: | |
- main | |
- release/** | |
schedule: | |
- cron: "0 3 * * 4" | |
env: | |
CARGO_MAKE_VERSION: "0.34.0" | |
jobs: | |
## Run all default oriented feature sets across all platforms. | |
platform-matrix: | |
name: platform | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
#os: [ubuntu-latest, macos-latest, windows-latest] | |
os: [ubuntu-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- uses: davidB/rust-cargo-make@v1 | |
with: | |
version: ${{ env.CARGO_MAKE_VERSION }} | |
- name: cargo make all-features | |
run: cargo make all-features | |
- name: target/kcov cache | |
uses: actions/cache@v3 | |
with: | |
path: target/kcov | |
key: ${{ runner.os }}-kcov-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-kcov-${{ hashFiles('**/Cargo.toml') }} | |
${{ runner.os }}-kcov | |
- name: cargo make coverage | |
run: cargo make coverage --env="FEATURES=--all-features" | |
- name: upload coverage | |
if: matrix.os == 'ubuntu-latest' | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
## Work through all of the variations of the different features, only on linux to save concurrent resources | |
exhaustive-features-matrix: | |
name: exhaustive | |
# Let's wait for the all-features cache | |
needs: platform-matrix | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# feature: [default-features, no-default-features, dns-over-rustls, dns-over-https-rustls, dns-over-native-tls, dns-over-openssl, dnssec-openssl, dnssec-ring, mdns, async-std] | |
feature: | |
[ | |
default-features, | |
no-default-features, | |
dns-over-rustls, | |
dns-over-https-rustls, | |
dns-over-quic, | |
dns-over-native-tls, | |
dnssec-openssl, | |
dnssec-ring, | |
mdns, | |
async-std, | |
] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- uses: davidB/rust-cargo-make@v1 | |
with: | |
version: ${{ env.CARGO_MAKE_VERSION }} | |
- name: cargo make | |
run: cargo make ${{ matrix.feature }} | |
- name: target/kcov cache | |
uses: actions/cache@v3 | |
with: | |
path: target/kcov | |
key: ${{ runner.os }}-kcov-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-kcov-${{ hashFiles('**/Cargo.toml') }} | |
${{ runner.os }}-kcov | |
- name: cargo make coverage | |
run: cargo make coverage --env=FEATURES="--features ${{ matrix.feature }}" | |
- name: upload coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
## Check past and future versions | |
## this enforces the minimum version of rust this project works with | |
past-future-matrix: | |
name: past-future | |
# Let's wait for the all-features cache | |
needs: platform-matrix | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: ["1.59.0", beta, nightly] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.version }} | |
override: true | |
- uses: davidB/rust-cargo-make@v1 | |
with: | |
version: ${{ env.CARGO_MAKE_VERSION }} | |
- name: cargo make no-default-features | |
run: cargo make no-default-features | |
- name: cargo make build-bench | |
if: matrix.version == 'nightly' | |
run: cargo make build-bench | |
## Execute the clippy checks | |
cleanliness: | |
name: cleanliness | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# not using the cargo cache here, since this differs significantly | |
- name: cargo-all cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo | |
key: ${{ runner.os }}-cargo-all-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo-all-${{ hashFiles('**/Cargo.toml') }} | |
${{ runner.os }}-cargo-all | |
${{ runner.os }}-cargo | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
components: rustfmt, clippy | |
override: true | |
- uses: davidB/rust-cargo-make@v1 | |
with: | |
version: ${{ env.CARGO_MAKE_VERSION }} | |
# Clippy | |
- name: cargo make clippy | |
run: cargo make clippy | |
# Rustfmt | |
- name: cargo make fmt | |
run: cargo make fmt | |
# Audit | |
- name: cargo audit | |
run: cargo make audit | |
# Build and run bind to test our compatibility with standard name servers | |
compatibility: | |
name: compatibility | |
# wait for the cache from all-features | |
needs: platform-matrix | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- uses: davidB/rust-cargo-make@v1 | |
with: | |
version: ${{ env.CARGO_MAKE_VERSION }} | |
- name: target/bind cache | |
uses: actions/cache@v3 | |
with: | |
path: target/bind | |
key: ${{ runner.os }}-bind-${{ hashFiles('**/Makefile.toml') }} | |
restore-keys: | | |
${{ runner.os }}-bind-${{ hashFiles('**/Makefile.toml') }} | |
${{ runner.os }}-bind | |
- name: cargo make bind-compatibility | |
run: cargo make bind-compatibility |