-
Notifications
You must be signed in to change notification settings - Fork 57
32 lines (29 loc) · 1.08 KB
/
rust-ci.yml
File metadata and controls
32 lines (29 loc) · 1.08 KB
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
name: Rust CI
on: [push, pull_request]
# Make sure CI fails on all warnings, including Clippy lints
env:
RUSTFLAGS: "-Dwarnings"
jobs:
editor-server-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cd editor-server && cp .env.development .env
- name: Start database
run: docker compose -f dev.docker-compose.yml up -d
- name: Migrate database
run: cd editor-server && set -a && source .env && set +a && cargo run -p migration -- up
- name: Build and clippy check
run: cargo clippy --manifest-path ./editor-server/Cargo.toml
- name: fmt check
run: cargo fmt --manifest-path ./editor-server/Cargo.toml
- name: Run test
run: cargo test --test '*' --manifest-path ./editor-server/Cargo.toml
file-server-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: build test and clippy check
run: cargo clippy --manifest-path ./file-server/Cargo.toml
- name: fmt check
run: cargo fmt --manifest-path ./file-server/Cargo.toml