-
-
Notifications
You must be signed in to change notification settings - Fork 13
104 lines (84 loc) · 2.09 KB
/
check.yaml
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Check
on: [push]
jobs:
workspace:
name: Node Workspace
runs-on: ubuntu-latest
strategy:
matrix:
node: [18]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.5.1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: extractions/setup-just@v1
- name: Install
run: just install
- name: Build
run: just build
env:
CI: true
- name: Lint
run: just lint
cargo:
name: Cargo Workspace
env:
CI: true
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- "6379:6379"
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: boluo
ports:
- "5432:5432"
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
- name: Setup rust cache
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build
- name: Clippy
run: cargo clippy
- name: Init test environment
run: cargo run -p manage-cli -- init
env:
DATABASE_URL: postgresql://postgres:postgres@localhost/boluo
- name: Test
run: cargo test
env:
DATABASE_URL: postgresql://postgres:postgres@localhost/boluo
TEST_DATABASE_URL: postgresql://postgres:postgres@localhost/boluo
SECRET: SOME_SECRET
REDIS_URL: redis://localhost/
DEBUG: 1
PORT: 3000
dprint:
name: Style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dprint/[email protected]
with:
dprint-version: 0.44.0
cargo-fmt:
name: Style (Rust)
runs-on: ubuntu-latest
container: rust:slim
steps:
- uses: actions/checkout@v2
- run: cargo fmt --all --check