diff --git a/.github/workflows/.github-actions.yml b/.github/workflows/.github-actions.yml index d7bccab5..07493ea6 100644 --- a/.github/workflows/.github-actions.yml +++ b/.github/workflows/.github-actions.yml @@ -17,5 +17,19 @@ jobs: with: channel: "stable" - run: flutter pub get - - run: flutter analyze - - run: flutter test \ No newline at end of file + # Test the sub-package against this repo's survey_kit, not the old version from pub.dev. + - run: | + cat > pubspec_overrides.yaml <<'EOF' + dependency_overrides: + survey_kit: + path: ../.. + EOF + working-directory: packages/survey_kit_image_answer + # The root analyze also reads packages/, so their dependencies must be resolved first. + - run: flutter pub get + working-directory: packages/survey_kit_image_answer + # Infos are not fatal: some deprecation replacements need a newer Flutter than the package supports. + - run: flutter analyze --no-fatal-infos + - run: flutter test + - run: flutter test + working-directory: packages/survey_kit_image_answer \ No newline at end of file diff --git a/packages/survey_kit_image_answer/lib/src/view/image_answer_view.dart b/packages/survey_kit_image_answer/lib/src/view/image_answer_view.dart index aac088a6..eff55ce6 100644 --- a/packages/survey_kit_image_answer/lib/src/view/image_answer_view.dart +++ b/packages/survey_kit_image_answer/lib/src/view/image_answer_view.dart @@ -1,6 +1,8 @@ import 'package:flutter/material.dart'; import 'package:image_picker/image_picker.dart'; import 'package:survey_kit/survey_kit.dart'; +import 'package:survey_kit_image_answer/src/answer_format/image_answer_format.dart'; +import 'package:survey_kit_image_answer/src/result/image_question_result.dart'; class ImageAnswerView extends StatefulWidget { final QuestionStep questionStep; diff --git a/packages/survey_kit_image_answer/test/image_question_result_test.dart b/packages/survey_kit_image_answer/test/image_question_result_test.dart index 07efa581..7c442f62 100644 --- a/packages/survey_kit_image_answer/test/image_question_result_test.dart +++ b/packages/survey_kit_image_answer/test/image_question_result_test.dart @@ -1,5 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:survey_kit/survey_kit.dart'; +import 'package:survey_kit_image_answer/survey_kit_image_answer.dart'; void main() { final tResult = ImageQuestionResult(