-
Notifications
You must be signed in to change notification settings - Fork 6
45 lines (38 loc) · 1.07 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
name: Rust
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
DPP_PG_URL: postgres://postgres:passw@localhost:5432/dino-park-packs-test-gha
jobs:
build:
runs-on: ubuntu-20.04
services:
postgres:
image: postgres:11
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: passw
POSTGRES_DB: dino-park-packs-test-gha
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- name: Install Rust 1.60.0
uses: actions-rs/toolchain@v1
with:
toolchain: 1.60.0
override: true
components: rustfmt, clippy
- name: FMT
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all --all-features -- -D warnings
- name: Build
run: cargo build --all --all-features --verbose
- name: Run tests
run: cargo test --all --features local -- --test-threads=1 --nocapture