Small fix to ddns update and unit test to verify. #481
This file contains hidden or 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
| # Based on https://github.com/actions-rs/meta/blob/master/recipes/msrv.md | |
| on: [push, pull_request] | |
| name: Actions | |
| jobs: | |
| check: | |
| name: Check | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| rust: | |
| - stable | |
| - beta | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v2 | |
| - name: Install toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| override: true | |
| - name: Run cargo check | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: check | |
| args: --all-features | |
| env: | |
| SQLX_OFFLINE: true | |
| test: | |
| name: Test Suite | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| rust: | |
| - stable | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v2 | |
| - name: Install toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| override: true | |
| - name: Allow ICMP socket creation | |
| run: sudo sysctl -w net.ipv4.ping_group_range="0 2147483647" | |
| - name: Run cargo test | |
| id: test | |
| run: cargo test --all-features --exclude register_derive_impl --workspace | |
| env: | |
| SQLX_OFFLINE: true | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| rust: | |
| - stable | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v2 | |
| - name: Install toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| override: true | |
| - name: Install rustfmt | |
| run: rustup component add rustfmt | |
| - name: Run cargo fmt | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: fmt | |
| args: --all -- --check | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| rust: | |
| - stable | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v2 | |
| - name: Install toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| override: true | |
| - name: Install clippy | |
| run: rustup component add clippy | |
| - name: Run cargo clippy | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: clippy | |
| args: -- -D warnings | |
| env: | |
| SQLX_OFFLINE: true | |
| coverage: | |
| name: Run coverage | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| rust: | |
| - stable | |
| env: | |
| CARGO_INCREMENTAL: "0" | |
| RUSTFLAGS: "-Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off" | |
| SQLX_OFFLINE: true | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v2 | |
| - name: Install toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| override: true | |
| components: llvm-tools-preview | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Allow ICMP socket creation | |
| run: sudo sysctl -w net.ipv4.ping_group_range="0 2147483647" | |
| - name: Generate code coverage | |
| id: coverage | |
| run: cargo llvm-cov --all-features --exclude register_derive_impl --workspace --no-fail-fast --lcov --output-path lcov.info | |
| env: | |
| NODE_COVERALLS_DEBUG: true | |
| # - name: Upload coverage to Codecov | |
| # uses: codecov/codecov-action@v3 | |
| # with: | |
| # # token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | |
| # files: lcov.info | |
| # fail_ci_if_error: true | |
| - name: Coveralls upload | |
| uses: coverallsapp/github-action@master | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| path-to-lcov: lcov.info | |
| debug: true |