Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ jobs:

snapshots:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dir:
- path: basic-project
- path: diagnostics
- path: dart3-features
sdk: 3.7.2
steps:
- uses: actions/checkout@v4
- name: Install scip cli
Expand All @@ -29,38 +37,31 @@ jobs:

- uses: dart-lang/setup-dart@v1
with:
# use a fixed version number so changes to 'stable', dont break snapshot diffs (language version is used in the scip symbol)
sdk: 2.19.6
- name: dart pub get scip-dart package
sdk: ${{ matrix.dir.sdk != null && matrix.dir.sdk || '2.19.6' }}
- name: pub get scip-dart package
run: dart pub get

- name: dart pub get basic-project directory
- name: pub get
working-directory: ./snapshots/input/${{ matrix.dir.path }}
run: dart pub get
working-directory: ./snapshots/input/basic-project

- name: dart pub get diagnostics directory
run: dart pub get
working-directory: ./snapshots/input/diagnostics

- name: Snapshots Diff Check
run: |
dart run scip_dart ./snapshots/input/basic-project --index-pubspec
./scip snapshot --to ./snapshots/output/basic-project
dart run scip_dart ./snapshots/input/${{ matrix.dir.path }} --index-pubspec
./scip snapshot --to ./snapshots/output/${{ matrix.dir.path }}

dart run scip_dart ./snapshots/input/diagnostics --index-pubspec
./scip snapshot --to ./snapshots/output/diagnostics

if [[ -z "$(git status --porcelain ./snapshots/output)" ]];
if [[ -z "$(git status --porcelain ./snapshots/output/${{ matrix.dir.path }})" ]];
then
echo "No changes to snapshot files"
else
echo
echo "Snapshot diff detected differences, run 'make gen-snaps' to re-generate snapshots"
git status --short ./snapshots/output
echo "Snapshot diff detected differences, run 'make regen-snapshots' to re-generate snapshots"
git --no-pager diff ./snapshots/output/${{ matrix.dir.path }}
echo
exit 1
fi


consumer:
runs-on: ubuntu-latest
strategy:
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
.DS_Store
index.scip
snapshots/input/staging-project/lib/**
snapshots/output/staging-project/lib/**
snapshots/output/staging-project/lib/**

# Temporary while we support both dart 2 and 3
pubspec.lock
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dart 2.19.6
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ regen-snapshots:
dart run scip_dart ./snapshots/input/diagnostics --index-pubspec
scip snapshot --to ./snapshots/output/diagnostics

asdf set dart 3.7.2
dart pub upgrade
dart run scip_dart ./snapshots/input/dart3-features --index-pubspec
scip snapshot --to ./snapshots/output/dart3-features
asdf set dart 2.19.6

run:
dart run scip_dart ./snapshots/input/staging-project --verbose

Expand Down
269 changes: 0 additions & 269 deletions pubspec.lock

This file was deleted.

2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: generates scip bindings for dart files
repository: https://github.com/Workiva/scip-dart

environment:
sdk: ">=2.19.6 <3.0.0"
sdk: ">=2.19.6 <4.0.0"

executables:
scip_dart:
Expand Down
Loading