Skip to content

Merge branch 'master' of github.com:shiroedev2024/doh-client #11

Merge branch 'master' of github.com:shiroedev2024/doh-client

Merge branch 'master' of github.com:shiroedev2024/doh-client #11

Workflow file for this run

name: Continuous Integration
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
rustfmt:
name: Job rustfmt
runs-on: ubuntu-latest
steps:
- name: Install toolchain with rustfmt
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
- uses: actions/checkout@v2
- name: Run rustfmt
run: cargo fmt --all -- --check
audit:
name: Job audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Run audit
uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
clippy:
name: Job clippy
needs: rustfmt
runs-on: ubuntu-latest
steps:
- name: Install toolchain with clippy
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
- uses: actions/checkout@v2
- name: Run clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: -- --deny warnings -A clippy::unknown-clippy-lints
clippy-windows-service:
name: Job clippy windows service
needs: rustfmt
runs-on: windows-latest
steps:
- name: Install toolchain with clippy
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
- uses: actions/checkout@v2
- name: Run clippy windows service
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --bin windows-service --features main-windows-service -- --deny warnings -A clippy::unknown-clippy-lints
tests:
name: Job tests
needs: [clippy, clippy-windows-service]
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust_channel: [stable, nightly]
features: [default, socks5, native-certs]
runs-on: ${{ matrix.os }}
steps:
- name: Install toolchain ${{ matrix.rust_channel }} on ${{ matrix.os }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust_channel }}
- uses: actions/checkout@v2
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --features "${{ matrix.features }}"
code-coverage:
name: Job code coverage
needs: tests
runs-on: ubuntu-latest
steps:
- name: Intall toolchain nightly on ubuntu-latest
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- uses: actions/checkout@v2
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
- name: Run grcov
uses: actions-rs/[email protected]
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
file: ${{ steps.coverage.outputs.report }}