diff --git a/.github/workflows/contextual-json-validator.yml b/.github/workflows/contextual-json-validator.yml index 263e795..90c67b5 100644 --- a/.github/workflows/contextual-json-validator.yml +++ b/.github/workflows/contextual-json-validator.yml @@ -14,11 +14,15 @@ permissions: jobs: contextual-json-validate: runs-on: ubuntu-latest + defaults: + run: + working-directory: surveys/survey-validator steps: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f - - run: dart surveys/validator/json-validator.dart + - run: dart pub get + - run: dart run analyze: runs-on: ubuntu-latest diff --git a/surveys/survey-validator/bin/survey_validator.dart b/surveys/survey-validator/bin/survey_validator.dart index a7ee421..a872035 100644 --- a/surveys/survey-validator/bin/survey_validator.dart +++ b/surveys/survey-validator/bin/survey_validator.dart @@ -3,8 +3,7 @@ import 'dart:io'; import 'package:survey_validator/survey_validator.dart' as survey_validator; void main(List arguments) { - final contextualSurveyFile = - File('${Directory.current.path}/surveys/contextual-survey-metadata.json'); + final contextualSurveyFile = File('../contextual-survey-metadata.json'); survey_validator.checkJson(contextualSurveyFile); }