-
-
Notifications
You must be signed in to change notification settings - Fork 16
88 lines (73 loc) · 1.89 KB
/
rust-and-ui-checks.yml
File metadata and controls
88 lines (73 loc) · 1.89 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
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
name: Rust and Ui Checks
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: true
jobs:
rust-checks:
name: Rust Checks
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_db
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
continue-on-error: true
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- name: Cargo Test
run: cargo test --no-fail-fast
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/test_db
- name: Rustfmt
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy -- -D warnings
ui-checks:
name: Typecheck, Lint, and Build
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 9
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
cache-dependency-path: ./ui/pnpm-lock.yaml
- name: Install dependencies
run: pnpm install
working-directory: ./ui
- name: Generate Prisma Client
run: pnpm prisma generate
working-directory: ./ui
- name: Lint
run: pnpm lint
working-directory: ./ui
- name: Typecheck
run: pnpm typecheck
working-directory: ./ui
- name: Build
run: pnpm build
working-directory: ./ui