meilisearch/.github/workflows/rust.yml

67 lines
1.6 KiB
YAML
Raw Normal View History

2021-02-24 17:31:28 +08:00
name: Rust
2021-03-16 17:26:08 +08:00
on:
pull_request:
push:
# trying and staging branches are for Bors config
branches:
- trying
- staging
2021-02-24 17:31:28 +08:00
env:
CARGO_TERM_COLOR: always
jobs:
2021-03-16 17:26:08 +08:00
tests:
name: Tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, macos-latest]
steps:
- uses: actions/checkout@v2
2021-04-27 18:36:36 +08:00
- name: Run cargo check without any default features
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --locked --release
2021-02-24 17:31:28 +08:00
# We don't run test on Windows since we get the following error: There is not enough space on the disk.
2021-04-27 18:36:36 +08:00
check-on-windows:
name: Cargo check on Windows
runs-on: windows-latest
2021-02-24 17:31:28 +08:00
steps:
- uses: actions/checkout@v2
2021-04-27 18:36:36 +08:00
- name: Run cargo check without any default features
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features
- name: Run cargo check with all default features
uses: actions-rs/cargo@v1
with:
2021-04-27 18:36:36 +08:00
command: check
clippy:
name: Run Clippy
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets -- --deny warnings