name: ci on: pull_request: push: branches: - master - staging - trying schedule: - cron: '00 01 * * *' env: RUSTFLAGS: -Dwarnings jobs: test: name: test runs-on: ubuntu-latest strategy: matrix: rust: # This is the minimum supported Rust version of this crate. # When updating this, the reminder to update the minimum supported # Rust version in README.md. # # Tests are not run as tests may require newer versions of Rust. - 1.31.0 - stable - beta - nightly steps: - uses: actions/checkout@master - name: Install Rust shell: bash run: | . ./ci/install-rust.sh ${{ matrix.rust }} - name: Install cargo-hack if: matrix.rust != '1.31.0' run: | cargo install cargo-hack - name: cargo check if: matrix.rust == '1.31.0' run: | cargo check --all-features - name: cargo test if: matrix.rust != '1.31.0' run: | cargo test --all-features - name: cargo hack check --each-feature if: matrix.rust != '1.31.0' run: | cargo hack check --all --each-feature --no-dev-deps # Refs: https://github.com/rust-lang/cargo/issues/5657 - name: cargo check -Zminimal-versions if: matrix.rust == 'nightly' run: | cargo update -Zminimal-versions cargo hack check --all --all-features --no-dev-deps --ignore-private style: name: style runs-on: ubuntu-latest strategy: fail-fast: false matrix: component: - clippy - rustfmt - rustdoc steps: - uses: actions/checkout@master - name: Install Rust shell: bash run: | . ./ci/install-rust.sh - name: Install component if: matrix.component != 'rustdoc' shell: bash run: | . ./ci/install-component.sh ${{ matrix.component }} - name: cargo clippy if: matrix.component == 'clippy' run: | cargo clippy --all --all-features --all-targets - name: cargo fmt -- --check if: matrix.component == 'rustfmt' run: | cargo fmt --all -- --check - name: cargo doc if: matrix.component == 'rustdoc' env: RUSTDOCFLAGS: -Dwarnings run: | cargo doc --no-deps --all --all-features