-
Notifications
You must be signed in to change notification settings - Fork 45
106 lines (89 loc) · 3.06 KB
/
Copy pathcontract_gates.yml
File metadata and controls
106 lines (89 loc) · 3.06 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
name: Contract Gates
on:
pull_request:
push:
branches:
- main
jobs:
tests-and-coverage:
name: Tests & coverage (gating)
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Flutter SDK
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Install mcp_server_dart dependencies
working-directory: mcp_server_dart
run: flutter pub get
- name: Run mcp_server_dart tests with coverage
working-directory: mcp_server_dart
env:
HOME: /tmp
DART_SUPPRESS_ANALYTICS: 'true'
run: |
dart pub global activate coverage
dart pub global run coverage:test_with_coverage --branch-coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: mcp_server_dart/coverage/lcov.info
flags: mcp_server_dart
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
informational:
name: Contracts & analysis (informational)
runs-on: ubuntu-latest
timeout-minutes: 20
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Flutter SDK
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Install mcp_server_dart dependencies
working-directory: mcp_server_dart
run: flutter pub get
- name: Analyze flutter_live_edit packages
continue-on-error: true
run: |
set -uo pipefail
for pkg in \
flutter_live_edit/flutter_live_edit_core \
flutter_live_edit/flutter_live_edit_agent \
flutter_live_edit/flutter_live_edit_toolkit \
flutter_live_edit/live_edit_tooling_ui_kit \
flutter_live_edit/live_edit_tooling_ui_kit_playground
do
if [[ ! -f "$pkg/pubspec.yaml" ]]; then
echo "== skip $pkg (pubspec.yaml missing) =="
continue
fi
echo "== analyze $pkg =="
(cd "$pkg" && flutter pub get) || true
dart analyze "$pkg" || true
done
- name: Live edit toolkit import boundary test
continue-on-error: true
if: ${{ hashFiles('flutter_live_edit/flutter_live_edit_toolkit/test/agent_import_boundary_test.dart') != '' }}
working-directory: flutter_live_edit/flutter_live_edit_toolkit
run: flutter test test/agent_import_boundary_test.dart
- name: Check docs/help drift
continue-on-error: true
run: bash tool/contracts/check_docs_drift.sh
- name: Check SDK parity
continue-on-error: true
run: bash tool/contracts/check_sdk_parity.sh
- name: Check plugin surfaces
continue-on-error: true
run: bash tool/contracts/check_plugin_surfaces.sh
- name: Check tool prefix
continue-on-error: true
run: bash tool/contracts/check_tool_prefix.sh