-
-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (41 loc) · 1.13 KB
/
continuous-integration.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
name: Continuous Integration
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
name: Build and Check
runs-on: ubuntu-24.04
steps:
- name: Checkout Project
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Stable with rustfmt and clippy
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: Install libraries
run: sudo apt install -y libpq-dev libsqlite3-dev # libmysqlclient-dev
- name: Cargo Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build --release
- name: Format Check
run: cargo fmt -- --check
- name: Clippy Check
run: cargo clippy --release # -- -D warnings
- name: Test
run: cargo test --release