-
Notifications
You must be signed in to change notification settings - Fork 3
116 lines (90 loc) · 3 KB
/
format-lint-test.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
105
106
107
108
109
110
111
112
113
114
115
116
name: Format, Lint, Test
on:
push:
branches: ["dev"]
pull_request:
branches: ["dev"]
jobs:
unime_frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: latest
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'
- name: Install NPM dependencies in project root and workspaces
run: pnpm i --frozen-lockfile
- name: Format
run: pnpm format:check
- name: Lint
run: pnpm lint
- name: Test
run: pnpm test
unime_core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Rust stable
# TODO Set back to @stable (workaround for #224).
# uses: dtolnay/[email protected] fails because it does not include rustfmt.
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.77.2
components: clippy, rustfmt
- name: Install dependencies
working-directory: ./unime/src-tauri
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libsoup-3.0 javascriptcoregtk-4.1 webkit2gtk-4.1
- name: Format
working-directory: ./unime/src-tauri
run: cargo fmt -- --check
- uses: pnpm/action-setup@v4
with:
version: latest
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'
- name: Build frontend
# Otherwise linting will fail with error: The `distDir` configuration is set to `"../build"` but this path doesn't exist.
run: pnpm i --frozen-lockfile && pnpm build
env:
PUBLIC_DEV_MODE_MENU_EXPANDED: false
PUBLIC_STYLE_SAFE_AREA_INSETS: false
- name: Lint
working-directory: ./unime/src-tauri
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Test
working-directory: ./unime/src-tauri
run: cargo test
identity_wallet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Rust stable
# TODO See comment above.
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.77.2
components: clippy, rustfmt
- name: Install dependencies
working-directory: ./identity-wallet
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libsoup-3.0 javascriptcoregtk-4.1 webkit2gtk-4.1
- name: Format
working-directory: ./identity-wallet
run: cargo fmt -- --check
- name: Lint
working-directory: ./identity-wallet
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Test
working-directory: ./identity-wallet
run: cargo test