2020
2121 snapshots :
2222 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
2331 steps :
2432 - uses : actions/checkout@v4
2533 - name : Install scip cli
@@ -29,38 +37,31 @@ jobs:
2937
3038 - uses : dart-lang/setup-dart@v1
3139 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
3542 run : dart pub get
3643
37- - name : dart pub get basic-project directory
44+ - name : pub get
45+ working-directory : ./snapshots/input/${{ matrix.dir.path }}
3846 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
4447
4548 - name : Snapshots Diff Check
4649 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 }}
4952
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 }})" ]];
5454 then
5555 echo "No changes to snapshot files"
5656 else
5757 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 }}
6060 echo
6161 exit 1
6262 fi
6363
64+
6465 consumer :
6566 runs-on : ubuntu-latest
6667 strategy :
0 commit comments