53 lines
1.6 KiB
YAML
53 lines
1.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
merge_group:
|
|
|
|
env:
|
|
HICKORY_REV: a3669bd80f3f7b97f0c301c15f1cba6368d97b63
|
|
DNS_TEST_VERBOSE_DOCKER_BUILD: 1
|
|
|
|
jobs:
|
|
ci:
|
|
name: Continuous Integration
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install ${{ matrix.rust }} toolchain
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: stable
|
|
components: clippy, rustfmt
|
|
|
|
- name: Run dns-test tests
|
|
run: cargo test -p dns-test -- --include-ignored
|
|
|
|
- name: Run tests against unbound
|
|
run: cargo test -p conformance-tests -- --include-ignored
|
|
|
|
- name: Run tests against BIND
|
|
run: DNS_TEST_SUBJECT=bind cargo test -p conformance-tests -- --include-ignored
|
|
|
|
- name: Run tests against hickory
|
|
run: |
|
|
git clone https://github.com/hickory-dns/hickory-dns /tmp/hickory
|
|
( cd /tmp/hickory && git reset --hard ${{ env.HICKORY_REV }} )
|
|
DNS_TEST_SUBJECT="hickory /tmp/hickory" cargo test -p conformance-tests
|
|
|
|
- name: Check that ignored tests fail with hickory
|
|
run: |
|
|
tmpfile="$(mktemp)"
|
|
DNS_TEST_SUBJECT="hickory /tmp/hickory" cargo test -p conformance-tests -- --ignored | tee "$tmpfile"
|
|
grep 'test result: FAILED. 0 passed' "$tmpfile" || ( echo "expected ALL tests to fail but at least one passed; the passing tests must be un-#[ignore]-d" && exit 1 )
|
|
|
|
- name: Check that code is formatted
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: Lint code
|
|
run: cargo clippy --workspace -- -D warnings
|