-
Notifications
You must be signed in to change notification settings - Fork 90
80 lines (73 loc) · 2.12 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Tests
on:
pull_request:
push:
# trying and staging branches are for BORS config
branches:
- trying
- staging
- main
env:
CARGO_TERM_COLOR: always
jobs:
integration_tests:
# Will not run if the event is a PR to bump-meilisearch-v* (so a pre-release PR)
# Will still run for each push to bump-meilisearch-v*
if: github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v')
runs-on: ubuntu-latest
name: integration-tests
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Meilisearch (latest version) setup with Docker
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest meilisearch --no-analytics --master-key=masterKey
- name: Run tests
run: cargo test --verbose
- name: Cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --workspace --all-targets --all
linter:
name: clippy-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install clippy
run: rustup component add clippy
- name: Run linter (clippy)
# Will fail when encountering warnings
run: cargo clippy -- -D warnings
formatter:
name: rust-format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run formatter
run: cargo fmt --all -- --check
readme_check:
name: readme-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check the README.md file is up-to-date
run: sh scripts/check-readme.sh
wasm_build:
name: wasm-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: |
rustup target add wasm32-unknown-unknown
cargo check -p web_app --target wasm32-unknown-unknown
yaml-lint:
name: Yaml linting check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Yaml lint check
uses: ibiqlik/action-yamllint@v3
with:
config_file: .yamllint.yml