Skip to content

Commit f5bbf29

Browse files
authored
ci: add Rust compilation and tests to PR checks (#409)
## Summary - Add a `rust` job to `ci.yml` that runs in parallel with the existing Node.js `test` job - Runs `cargo test` (~130 unit tests) and `cargo clippy` on every PR - Catches breaking dependency upgrades (e.g. keyring v4) that previously slipped through because only `release.yml` compiled Rust
1 parent cd7fa94 commit f5bbf29

10 files changed

Lines changed: 174 additions & 30 deletions

File tree

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,43 @@ jobs:
9696
exit 1
9797
fi
9898
echo "No unstable Zustand selector patterns found."
99+
100+
rust:
101+
name: Rust
102+
runs-on: ubuntu-latest
103+
104+
steps:
105+
- name: Checkout
106+
uses: actions/checkout@v6
107+
108+
- name: Install system dependencies
109+
run: |
110+
sudo apt-get update
111+
sudo apt-get install -y \
112+
libwebkit2gtk-4.1-dev \
113+
libappindicator3-dev \
114+
librsvg2-dev \
115+
patchelf \
116+
libxss-dev \
117+
libdbus-1-dev
118+
119+
- name: Setup Rust
120+
uses: dtolnay/rust-toolchain@stable
121+
with:
122+
components: clippy
123+
124+
- name: Rust cache
125+
uses: Swatinem/rust-cache@v2
126+
with:
127+
workspaces: apps/fluux/src-tauri
128+
129+
- name: Run tests
130+
working-directory: apps/fluux/src-tauri
131+
run: cargo test --locked
132+
133+
- name: Clippy
134+
working-directory: apps/fluux/src-tauri
135+
run: cargo clippy --locked -- -D warnings
136+
137+
- name: Check generated files are up to date
138+
run: git diff --exit-code apps/fluux/src-tauri/gen/

apps/fluux/src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/fluux/src-tauri/gen/schemas/acl-manifests.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/fluux/src-tauri/gen/schemas/desktop-schema.json

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2601,10 +2601,10 @@
26012601
"markdownDescription": "Default core plugins set.\n#### This default permission set includes:\n\n- `core:path:default`\n- `core:event:default`\n- `core:window:default`\n- `core:webview:default`\n- `core:app:default`\n- `core:image:default`\n- `core:resources:default`\n- `core:menu:default`\n- `core:tray:default`"
26022602
},
26032603
{
2604-
"description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`",
2604+
"description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`\n- `allow-supports-multiple-windows`",
26052605
"type": "string",
26062606
"const": "core:app:default",
2607-
"markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`"
2607+
"markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`\n- `allow-supports-multiple-windows`"
26082608
},
26092609
{
26102610
"description": "Enables the app_hide command without any pre-configured scope.",
@@ -2678,6 +2678,12 @@
26782678
"const": "core:app:allow-set-dock-visibility",
26792679
"markdownDescription": "Enables the set_dock_visibility command without any pre-configured scope."
26802680
},
2681+
{
2682+
"description": "Enables the supports_multiple_windows command without any pre-configured scope.",
2683+
"type": "string",
2684+
"const": "core:app:allow-supports-multiple-windows",
2685+
"markdownDescription": "Enables the supports_multiple_windows command without any pre-configured scope."
2686+
},
26812687
{
26822688
"description": "Enables the tauri_version command without any pre-configured scope.",
26832689
"type": "string",
@@ -2762,6 +2768,12 @@
27622768
"const": "core:app:deny-set-dock-visibility",
27632769
"markdownDescription": "Denies the set_dock_visibility command without any pre-configured scope."
27642770
},
2771+
{
2772+
"description": "Denies the supports_multiple_windows command without any pre-configured scope.",
2773+
"type": "string",
2774+
"const": "core:app:deny-supports-multiple-windows",
2775+
"markdownDescription": "Denies the supports_multiple_windows command without any pre-configured scope."
2776+
},
27652777
{
27662778
"description": "Denies the tauri_version command without any pre-configured scope.",
27672779
"type": "string",
@@ -3285,10 +3297,10 @@
32853297
"markdownDescription": "Denies the close command without any pre-configured scope."
32863298
},
32873299
{
3288-
"description": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-show-menu-on-left-click`",
3300+
"description": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-icon-with-as-template`\n- `allow-set-show-menu-on-left-click`",
32893301
"type": "string",
32903302
"const": "core:tray:default",
3291-
"markdownDescription": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-show-menu-on-left-click`"
3303+
"markdownDescription": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-icon-with-as-template`\n- `allow-set-show-menu-on-left-click`"
32923304
},
32933305
{
32943306
"description": "Enables the get_by_id command without any pre-configured scope.",
@@ -3320,6 +3332,12 @@
33203332
"const": "core:tray:allow-set-icon-as-template",
33213333
"markdownDescription": "Enables the set_icon_as_template command without any pre-configured scope."
33223334
},
3335+
{
3336+
"description": "Enables the set_icon_with_as_template command without any pre-configured scope.",
3337+
"type": "string",
3338+
"const": "core:tray:allow-set-icon-with-as-template",
3339+
"markdownDescription": "Enables the set_icon_with_as_template command without any pre-configured scope."
3340+
},
33233341
{
33243342
"description": "Enables the set_menu command without any pre-configured scope.",
33253343
"type": "string",
@@ -3386,6 +3404,12 @@
33863404
"const": "core:tray:deny-set-icon-as-template",
33873405
"markdownDescription": "Denies the set_icon_as_template command without any pre-configured scope."
33883406
},
3407+
{
3408+
"description": "Denies the set_icon_with_as_template command without any pre-configured scope.",
3409+
"type": "string",
3410+
"const": "core:tray:deny-set-icon-with-as-template",
3411+
"markdownDescription": "Denies the set_icon_with_as_template command without any pre-configured scope."
3412+
},
33893413
{
33903414
"description": "Denies the set_menu command without any pre-configured scope.",
33913415
"type": "string",
@@ -3645,10 +3669,16 @@
36453669
"markdownDescription": "Denies the webview_size command without any pre-configured scope."
36463670
},
36473671
{
3648-
"description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-internal-toggle-maximize`",
3672+
"description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-activity-name`\n- `allow-scene-identifier`\n- `allow-internal-toggle-maximize`",
36493673
"type": "string",
36503674
"const": "core:window:default",
3651-
"markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-internal-toggle-maximize`"
3675+
"markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-activity-name`\n- `allow-scene-identifier`\n- `allow-internal-toggle-maximize`"
3676+
},
3677+
{
3678+
"description": "Enables the activity_name command without any pre-configured scope.",
3679+
"type": "string",
3680+
"const": "core:window:allow-activity-name",
3681+
"markdownDescription": "Enables the activity_name command without any pre-configured scope."
36523682
},
36533683
{
36543684
"description": "Enables the available_monitors command without any pre-configured scope.",
@@ -3842,6 +3872,12 @@
38423872
"const": "core:window:allow-scale-factor",
38433873
"markdownDescription": "Enables the scale_factor command without any pre-configured scope."
38443874
},
3875+
{
3876+
"description": "Enables the scene_identifier command without any pre-configured scope.",
3877+
"type": "string",
3878+
"const": "core:window:allow-scene-identifier",
3879+
"markdownDescription": "Enables the scene_identifier command without any pre-configured scope."
3880+
},
38453881
{
38463882
"description": "Enables the set_always_on_bottom command without any pre-configured scope.",
38473883
"type": "string",
@@ -4106,6 +4142,12 @@
41064142
"const": "core:window:allow-unminimize",
41074143
"markdownDescription": "Enables the unminimize command without any pre-configured scope."
41084144
},
4145+
{
4146+
"description": "Denies the activity_name command without any pre-configured scope.",
4147+
"type": "string",
4148+
"const": "core:window:deny-activity-name",
4149+
"markdownDescription": "Denies the activity_name command without any pre-configured scope."
4150+
},
41094151
{
41104152
"description": "Denies the available_monitors command without any pre-configured scope.",
41114153
"type": "string",
@@ -4298,6 +4340,12 @@
42984340
"const": "core:window:deny-scale-factor",
42994341
"markdownDescription": "Denies the scale_factor command without any pre-configured scope."
43004342
},
4343+
{
4344+
"description": "Denies the scene_identifier command without any pre-configured scope.",
4345+
"type": "string",
4346+
"const": "core:window:deny-scene-identifier",
4347+
"markdownDescription": "Denies the scene_identifier command without any pre-configured scope."
4348+
},
43014349
{
43024350
"description": "Denies the set_always_on_bottom command without any pre-configured scope.",
43034351
"type": "string",

0 commit comments

Comments
 (0)