docker pull and time (#52)

* docker pull and time

* move docker pull to previous step

* test

* fix

* add newline after each test

* newline

* disable prefer inline rule

* Update test

* Update test
This commit is contained in:
Lars Hvam
2022-01-09 15:21:23 +01:00
committed by GitHub
parent c20156c614
commit b7477a238b
4 changed files with 9 additions and 8 deletions

View File

@@ -35,5 +35,6 @@ jobs:
- run: npm install @abaplint/cli -g
- run: abaplint abaplint_exercises.json
- run: abaplint abaplint_solutions.json
- run: docker pull exercism/abap-test-runner
- name: Run tests for all exercises
run: sh ./bin/test

View File

@@ -424,7 +424,7 @@
"parser_error": true,
"parser_missing_space": true,
"pragma_placement": true,
"prefer_inline": true,
"prefer_inline": false,
"prefer_is_not": true,
"prefer_raise_exception_new": true,
"prefer_returning_to_exporting": true,

View File

@@ -420,7 +420,7 @@
"parser_error": true,
"parser_missing_space": true,
"pragma_placement": true,
"prefer_inline": true,
"prefer_inline": false,
"prefer_is_not": true,
"prefer_raise_exception_new": false,
"prefer_returning_to_exporting": true,

View File

@@ -37,7 +37,7 @@ for practice_exercise_dir in ./exercises/practice/*/; do
results_file_path="$(realpath "${practice_exercise_dir}")/results.json"
expected_results_file_path="$(realpath "${practice_exercise_dir}")/expected_results.json"
cp $(realpath "${practice_exercise_dir}")/.meta/*.clas.abap $(realpath "${practice_exercise_dir}")
docker run \
/usr/bin/time -f 'Runtime: %e seconds' docker run \
--rm \
--network none \
--mount type=bind,src="$(realpath "${practice_exercise_dir}")",dst=/solution \
@@ -47,8 +47,8 @@ for practice_exercise_dir in ./exercises/practice/*/; do
errors="$(diff "${results_file_path}" "${expected_results_file_path}")"
printf "$errors"
if [ -z ${errors+x} ];
then echo "No Erros";
if [ -z ${errors} ];
then printf "No Errors\n\n";
else exit_code=1;
fi
fi