mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-25 14:10:06 +01:00
6f7a4d95d9
Bumps [Swatinem/rust-cache](https://github.com/Swatinem/rust-cache) from 1.3.0 to 1.4.0. - [Release notes](https://github.com/Swatinem/rust-cache/releases) - [Changelog](https://github.com/Swatinem/rust-cache/blob/v1/CHANGELOG.md) - [Commits](https://github.com/Swatinem/rust-cache/compare/v1.3.0...v1.4.0) --- updated-dependencies: - dependency-name: Swatinem/rust-cache dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
93 lines
2.2 KiB
YAML
93 lines
2.2 KiB
YAML
name: Rust
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
push:
|
|
# trying and staging branches are for Bors config
|
|
branches:
|
|
- trying
|
|
- staging
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUST_BACKTRACE: 1
|
|
RUSTFLAGS: "-D warnings"
|
|
|
|
jobs:
|
|
tests:
|
|
name: Tests on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-18.04, macos-latest, windows-latest]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Cache dependencies
|
|
uses: Swatinem/rust-cache@v1.4.0
|
|
- name: Run cargo check without any default features
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: build
|
|
args: --locked --release --no-default-features
|
|
- name: Run cargo test
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --locked --release
|
|
|
|
# We run tests in debug also, to make sure that the debug_assertions are hit
|
|
test-debug:
|
|
name: Run tests in debug
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
- name: Cache dependencies
|
|
uses: Swatinem/rust-cache@v1.4.0
|
|
- name: Run tests in debug
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --locked
|
|
|
|
clippy:
|
|
name: Run Clippy
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
components: clippy
|
|
- name: Cache dependencies
|
|
uses: Swatinem/rust-cache@v1.4.0
|
|
- name: Run cargo clippy
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: clippy
|
|
args: --all-targets -- --deny warnings
|
|
|
|
fmt:
|
|
name: Run Rustfmt
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
components: rustfmt
|
|
- name: Cache dependencies
|
|
uses: Swatinem/rust-cache@v1.4.0
|
|
- name: Run cargo fmt
|
|
run: cargo fmt --all -- --check
|