Silence nightly warning #87
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: continuous integration | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-2019, macOS-latest] | |
rust: [stable, nightly] | |
features: ["default", "sync,tls-rustls"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v1 | |
- name: Install rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
# Force to build without warnings | |
env: | |
RUSTFLAGS: '-D warnings' | |
with: | |
command: build | |
args: --verbose --no-default-features --features ${{ matrix.features }} | |
- name: Run tests | |
uses: actions-rs/cargo@v1 | |
# force to build tests without warnings | |
env: | |
RUSTFLAGS: '-D warnings' | |
with: | |
command: test | |
args: --verbose --no-default-features --features ${{ matrix.features }} | |
rustfmt_check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v1 | |
- name: Ensure that rustfmt is installed | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
components: rustfmt | |
- name: Run rustfmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |