-
-
Notifications
You must be signed in to change notification settings - Fork 877
46 lines (38 loc) · 1.45 KB
/
auth-lint.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
name: "Lint (auth)"
on:
# Run on every pull request (open or push to it) that changes auth/
pull_request:
paths:
- "auth/**"
- ".github/workflows/auth-lint.yml"
env:
FLUTTER_VERSION: "3.24.3"
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: auth
steps:
- name: Checkout code and submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: Verify custom icons are lowercase including optional understores, and end with .svg
run: |
find assets/custom-icons -type f -name "*.svg" | while read -r file; do
if [[ "$(basename "$file")" != "$(basename "$file" | tr '[:upper:]' '[:lower:]' | tr ' ' '_')" ]]; then
echo "File name is not lowercase: $file"
exit 1
fi
done
- name: Verify custom icon JSON
run: cat assets/custom-icons/_data/custom-icons.json | jq empty
- name: Install Flutter ${{ env.FLUTTER_VERSION }}
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- run: flutter pub get
- run: flutter analyze --no-fatal-infos