-
Notifications
You must be signed in to change notification settings - Fork 44
58 lines (47 loc) · 1.26 KB
/
ci-workflow.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
name: CI
on:
- push
- pull_request
jobs:
build-and-test:
name: "Build and test the code"
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Yarn deps for frontend
run: yarn install
working-directory: ./frontend
- name: Install wasm-pack
uses: jetli/wasm-pack-action@v0.4.0
with:
version: 'latest'
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Cache cargo build
uses: Swatinem/rust-cache@v2
- name: Build frontend
run: yarn build
working-directory: ./frontend
- name: Test frontend
run: yarn test
working-directory: ./frontend
- name: Lint frontend
run: yarn lint
working-directory: ./frontend
- name: Check frontend formatting
run: yarn prettier --check
working-directory: ./frontend
- name: Lint Rust code
run: cargo clippy
- name: Check Rust formatting
run: cargo fmt --all -- --check
- name: Test Rust code
run: cargo test --all