-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.47 KB
/
ci.yml
File metadata and controls
60 lines (48 loc) · 1.47 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
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
frontend:
name: Frontend type-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
# vue-tsc type-check + vite build (mirrors `npm run build`)
- run: npm run build
rust:
name: Rust check
runs-on: macos-latest
steps:
# Check out both repos as siblings inside the workspace so that
# src-tauri/Cargo.toml's path = "../../rust-matc" resolves correctly:
# $GITHUB_WORKSPACE/matc-ui/src-tauri/ -> ../../rust-matc -> $GITHUB_WORKSPACE/rust-matc/
- uses: actions/checkout@v4
with:
path: matc-ui
- uses: actions/checkout@v4
with:
repository: tom-code/rust-matc
path: rust-matc
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: matc-ui/src-tauri -> target
- name: fmt
working-directory: matc-ui
run: cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check
- name: check
working-directory: matc-ui
run: cargo check --manifest-path src-tauri/Cargo.toml
- name: clippy
working-directory: matc-ui
run: cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings