forked from konstantinullrich/bitbox_flutter
-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (61 loc) · 1.6 KB
/
Copy pathpull-request.yaml
File metadata and controls
66 lines (61 loc) · 1.6 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
name: PR checks
on:
pull_request:
push:
branches: [develop, main]
permissions:
contents: read
jobs:
flutter:
name: Flutter analyze + test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.41.6"
channel: stable
cache: true
- run: flutter pub get
- run: dart format --set-exit-if-changed --output=none lib test example/lib example/test
- run: flutter analyze --fatal-infos
- run: flutter test
go:
name: Go unit tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: go
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go/go.mod
cache: true
cache-dependency-path: go/go.sum
- run: go vet ./...
- run: go test -race -timeout 60s ./...
yaml-lint:
name: Workflow YAML lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: parse every workflow + action YAML
run: |
python3 - <<'PY'
import glob, sys, yaml
paths = sorted(set(
glob.glob('.github/**/*.yml', recursive=True) +
glob.glob('.github/**/*.yaml', recursive=True)
))
bad = []
for p in paths:
try:
yaml.safe_load(open(p))
print(f'ok {p}')
except Exception as e:
bad.append((p, e))
print(f'BAD {p}: {e}')
if bad:
sys.exit(1)
PY