20
20
21
21
snapshots :
22
22
runs-on : ubuntu-latest
23
+ strategy :
24
+ fail-fast : false
25
+ matrix :
26
+ dir :
27
+ - path : basic-project
28
+ - path : diagnostics
29
+ - path : dart3-features
30
+ sdk : 3.7.2
23
31
steps :
24
32
- uses : actions/checkout@v4
25
33
- name : Install scip cli
@@ -29,38 +37,31 @@ jobs:
29
37
30
38
- uses : dart-lang/setup-dart@v1
31
39
with :
32
- # use a fixed version number so changes to 'stable', dont break snapshot diffs (language version is used in the scip symbol)
33
- sdk : 2.19.6
34
- - name : dart pub get scip-dart package
40
+ sdk : ${{ matrix.dir.sdk != null && matrix.dir.sdk || '2.19.6' }}
41
+ - name : pub get scip-dart package
35
42
run : dart pub get
36
43
37
- - name : dart pub get basic-project directory
44
+ - name : pub get
45
+ working-directory : ./snapshots/input/${{ matrix.dir.path }}
38
46
run : dart pub get
39
- working-directory : ./snapshots/input/basic-project
40
-
41
- - name : dart pub get diagnostics directory
42
- run : dart pub get
43
- working-directory : ./snapshots/input/diagnostics
44
47
45
48
- name : Snapshots Diff Check
46
49
run : |
47
- dart run scip_dart ./snapshots/input/basic-project --index-pubspec
48
- ./scip snapshot --to ./snapshots/output/basic-project
50
+ dart run scip_dart ./snapshots/input/${{ matrix.dir.path }} --index-pubspec
51
+ ./scip snapshot --to ./snapshots/output/${{ matrix.dir.path }}
49
52
50
- dart run scip_dart ./snapshots/input/diagnostics --index-pubspec
51
- ./scip snapshot --to ./snapshots/output/diagnostics
52
-
53
- if [[ -z "$(git status --porcelain ./snapshots/output)" ]];
53
+ if [[ -z "$(git status --porcelain ./snapshots/output/${{ matrix.dir.path }})" ]];
54
54
then
55
55
echo "No changes to snapshot files"
56
56
else
57
57
echo
58
- echo "Snapshot diff detected differences, run 'make gen-snaps ' to re-generate snapshots"
59
- git status --short ./snapshots/output
58
+ echo "Snapshot diff detected differences, run 'make regen-snapshots ' to re-generate snapshots"
59
+ git --no-pager diff ./snapshots/output/${{ matrix.dir.path }}
60
60
echo
61
61
exit 1
62
62
fi
63
63
64
+
64
65
consumer :
65
66
runs-on : ubuntu-latest
66
67
strategy :
0 commit comments