-
Notifications
You must be signed in to change notification settings - Fork 90
132 lines (120 loc) · 3.76 KB
/
Copy pathlint.yml
File metadata and controls
132 lines (120 loc) · 3.76 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
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
name: Lint
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
workspace: ${{ steps.filter.outputs.workspace }}
node: ${{ steps.filter.outputs.node }}
wasm: ${{ steps.filter.outputs.wasm }}
js: ${{ steps.filter.outputs.js }}
ios: ${{ steps.filter.outputs.ios }}
android: ${{ steps.filter.outputs.android }}
config: ${{ steps.filter.outputs.config }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
workspace:
- 'crates/**'
- 'bindings/**'
- 'apps/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.cargo/**'
- 'rust-toolchain.toml'
- 'rustfmt.toml'
- '.github/workflows/lint.yml'
- '.github/workflows/lint-workspace*'
node:
- 'bindings/node/**'
- '.github/workflows/lint-node*'
wasm:
- 'bindings/wasm/**'
- 'rust-toolchain.toml'
- '.github/workflows/lint-wasm*'
js:
- 'sdks/js/**'
- 'bindings/node/**'
- 'bindings/wasm/**'
- 'crates/**'
- 'nix/**'
- 'flake.lock'
- '.github/workflows/lint-js*'
ios:
- 'sdks/ios/**'
- '.github/workflows/lint-ios*'
android:
- 'sdks/android/**'
- 'bindings/mobile/**'
- '.github/workflows/lint-android*'
config:
- '**/*.toml'
- '**/*.nix'
- 'flake.nix'
- 'dev/**'
- '.github/workflows/lint-config*'
lint-workspace:
needs: detect-changes
if: needs.detect-changes.outputs.workspace == 'true'
uses: ./.github/workflows/lint-workspace.yml
secrets: inherit
lint-node:
needs: detect-changes
if: needs.detect-changes.outputs.node == 'true'
uses: ./.github/workflows/lint-node.yml
secrets: inherit
lint-wasm:
needs: detect-changes
if: needs.detect-changes.outputs.wasm == 'true'
uses: ./.github/workflows/lint-wasm.yml
secrets: inherit
lint-js:
needs: detect-changes
if: needs.detect-changes.outputs.js == 'true'
uses: ./.github/workflows/lint-js.yml
secrets: inherit
lint-ios:
needs: detect-changes
if: needs.detect-changes.outputs.ios == 'true'
uses: ./.github/workflows/lint-ios.yml
secrets: inherit
lint-android:
needs: detect-changes
if: needs.detect-changes.outputs.android == 'true'
uses: ./.github/workflows/lint-android.yml
secrets: inherit
lint-config:
needs: detect-changes
if: needs.detect-changes.outputs.config == 'true'
uses: ./.github/workflows/lint-config.yml
secrets: inherit
lint:
name: Lint
runs-on: ubuntu-latest
if: always()
needs:
- lint-workspace
- lint-node
- lint-wasm
- lint-js
# - lint-ios TODO:(nm) Temporarily making optional until we are confident the new workflows are fast/reliable enough to block CI
# - lint-android TODO:(nm) Temporarily making optional until we are confident the new workflows are fast/reliable enough to block CI
- lint-config
steps:
- run: |
if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" || \
"${{ contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
echo "One or more lint jobs failed or were cancelled"
exit 1
fi