-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.15 KB
/
rust.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
name: Rust
on:
push:
branches: ["master", "dev"]
pull_request:
types:
- review_requested
- ready_for_review
- opened
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, '[skip-ci]') }}
steps:
- name: Checkout source code
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
override: true
components: rustfmt, clippy
- name: Install diesel_cli
run: cargo install diesel_cli --no-default-features --features sqlite
- name: Run diesel migration
run: diesel migration run
- name: Install protoc
run: sudo apt install -y protobuf-compiler
- name: Check
run: cargo check --workspace --all-targets --all-features
- name: Build
run: cargo build
- name: Start Redis
uses: supercharge/[email protected]
with:
redis-version: 6
- name: Run tests
run: cargo test -- --test-threads=1