forked from tauri-apps/plugins-workspace
-
Notifications
You must be signed in to change notification settings - Fork 0
154 lines (143 loc) · 4.93 KB
/
lint-rust.yml
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: Lint Rust
on:
push:
branches:
- v1
- v2
paths:
- '.github/workflows/lint-rust.yml'
- 'plugins/*/src/**'
- '!plugins/*/src/api-iife.js'
- '**/Cargo.toml'
pull_request:
branches:
- v1
- v2
paths:
- '.github/workflows/lint-rust.yml'
- 'plugins/*/src/**'
- '!plugins/*/src/api-iife.js'
- '**/Cargo.toml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
packages: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
tauri-plugin-autostart:
- .github/workflows/lint-rust.yml
- plugins/autostart/**
tauri-plugin-cli:
- .github/workflows/lint-rust.yml
- plugins/cli/**
tauri-plugin-clipboard-manager:
- .github/workflows/lint-rust.yml
- plugins/clipboard-manager/**
tauri-plugin-deep-link:
- .github/workflows/lint-rust.yml
- plugins/deep-link/**
tauri-plugin-dialog:
- .github/workflows/lint-rust.yml
- plugins/dialog/**
- plugins/fs/**
tauri-plugin-fs:
- .github/workflows/lint-rust.yml
- plugins/fs/**
tauri-plugin-geolocation:
- .github/workflows/lint-rust.yml
- plugins/geolocation/**
tauri-plugin-global-shortcut:
- .github/workflows/lint-rust.yml
- plugins/global-shortcut/**
tauri-plugin-haptics:
- .github/workflows/lint-rust.yml
- plugins/haptics/**
tauri-plugin-http:
- .github/workflows/lint-rust.yml
- plugins/http/**
- plugins/fs/**
tauri-plugin-localhost:
- .github/workflows/lint-rust.yml
- plugins/localhost/**
tauri-plugin-log:
- .github/workflows/lint-rust.yml
- plugins/log/**
tauri-plugin-notification:
- .github/workflows/lint-rust.yml
- plugins/notification/**
tauri-plugin-os:
- .github/workflows/lint-rust.yml
- plugins/os/**
tauri-plugin-persisted-scope:
- .github/workflows/lint-rust.yml
- plugins/persisted-scope/**
- plugins/fs/**
tauri-plugin-positioner:
- .github/workflows/lint-rust.yml
- plugins/positioner/**
tauri-plugin-process:
- .github/workflows/lint-rust.yml
- plugins/process/**
tauri-plugin-shell:
- .github/workflows/lint-rust.yml
- plugins/shell/**
tauri-plugin-single-instance:
- .github/workflows/lint-rust.yml
- plugins/single-instance/**
tauri-plugin-sql:
- .github/workflows/lint-rust.yml
- plugins/sql/**
tauri-plugin-store:
- .github/workflows/lint-rust.yml
- plugins/store/**
tauri-plugin-stronghold:
- .github/workflows/lint-rust.yml
- plugins/stronghold/**
tauri-plugin-updater:
- .github/workflows/lint-rust.yml
- plugins/updater/**
tauri-plugin-upload:
- .github/workflows/lint-rust.yml
- plugins/upload/**
tauri-plugin-websocket:
- .github/workflows/lint-rust.yml
- plugins/websocket/**
tauri-plugin-window-state:
- .github/workflows/lint-rust.yml
- plugins/window-state/**
clippy:
needs: changes
if: ${{ needs.changes.outputs.packages != '[]' && needs.changes.outputs.packages != '' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package: ${{ fromJSON(needs.changes.outputs.packages) }}
steps:
- uses: actions/checkout@v4
- name: install webkit2gtk
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev
- name: Install clippy with stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: clippy ${{ matrix.package }}
run: cargo clippy --package ${{ matrix.package }} --all-targets -- -D warnings
- name: clippy ${{ matrix.package }} --all-features
run: cargo clippy --package ${{ matrix.package }} --all-targets --all-features -- -D warnings