mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-08-16 14:52:41 +02:00
![dependabot[bot]](/assets/img/avatar_default.png)
Bumps [Swatinem/rust-cache](https://github.com/Swatinem/rust-cache) from 2.0.1 to 2.2.0. - [Release notes](https://github.com/Swatinem/rust-cache/releases) - [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md) - [Commits](https://github.com/Swatinem/rust-cache/compare/v2.0.1...v2.2.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>
89 lines
2.4 KiB
YAML
89 lines
2.4 KiB
YAML
name: Rust
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 5 * * MON' # Every Monday at 5:00am
|
|
push:
|
|
branches: [ staging, trying ] # For Bors
|
|
pull_request:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUSTFLAGS: "-D warnings"
|
|
|
|
jobs:
|
|
tests:
|
|
name: Tests on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-20.04, macos-latest, windows-latest]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Run test with Rust nightly
|
|
if: github.event_name == 'schedule'
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: nightly
|
|
override: true
|
|
- name: Run test with Rust stable
|
|
if: github.event_name != 'schedule'
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
- name: Cache dependencies
|
|
uses: Swatinem/rust-cache@v2.2.0
|
|
- name: Run cargo check
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: check
|
|
args: --workspace --all-targets --release
|
|
- name: Run cargo test
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --release --all
|
|
|
|
clippy:
|
|
name: Run Clippy
|
|
runs-on: ubuntu-20.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@v2.2.0
|
|
- name: Run cargo clippy
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: clippy
|
|
|
|
fmt:
|
|
name: Run Rustfmt
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: nightly
|
|
override: true
|
|
components: rustfmt
|
|
- name: Cache dependencies
|
|
uses: Swatinem/rust-cache@v2.2.0
|
|
- name: Run cargo fmt
|
|
# Since we never ran the `build.rs` script in the benchmark directory we are missing one auto-generated import file.
|
|
# Since we want to trigger (and fail) this action as fast as possible, instead of building the benchmark crate
|
|
# we are going to create an empty file where rustfmt expects it.
|
|
run: |
|
|
echo -ne "\n" > benchmarks/benches/datasets_paths.rs
|
|
cargo fmt --all -- --check
|