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: npm install @abaplint/cli -g
- run: abaplint abaplint_exercises.json - run: abaplint abaplint_exercises.json
- run: abaplint abaplint_solutions.json - run: abaplint abaplint_solutions.json
- run: docker pull exercism/abap-test-runner
- name: Run tests for all exercises - name: Run tests for all exercises
run: sh ./bin/test run: sh ./bin/test

View File

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

View File

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

View File

@@ -2,8 +2,8 @@
# Synopsis: # Synopsis:
# Test the track's exercises. # Test the track's exercises.
# #
# At a minimum, this file must check if the example/exemplar solution of each # At a minimum, this file must check if the example/exemplar solution of each
# Practice/Concept Exercise passes the exercise's tests. # Practice/Concept Exercise passes the exercise's tests.
# #
# To check this, you usually have to (temporarily) replace the exercise's solution files # To check this, you usually have to (temporarily) replace the exercise's solution files
@@ -37,7 +37,7 @@ for practice_exercise_dir in ./exercises/practice/*/; do
results_file_path="$(realpath "${practice_exercise_dir}")/results.json" results_file_path="$(realpath "${practice_exercise_dir}")/results.json"
expected_results_file_path="$(realpath "${practice_exercise_dir}")/expected_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}") cp $(realpath "${practice_exercise_dir}")/.meta/*.clas.abap $(realpath "${practice_exercise_dir}")
docker run \ /usr/bin/time -f 'Runtime: %e seconds' docker run \
--rm \ --rm \
--network none \ --network none \
--mount type=bind,src="$(realpath "${practice_exercise_dir}")",dst=/solution \ --mount type=bind,src="$(realpath "${practice_exercise_dir}")",dst=/solution \
@@ -47,9 +47,9 @@ for practice_exercise_dir in ./exercises/practice/*/; do
errors="$(diff "${results_file_path}" "${expected_results_file_path}")" errors="$(diff "${results_file_path}" "${expected_results_file_path}")"
printf "$errors" printf "$errors"
if [ -z ${errors+x} ]; if [ -z ${errors} ];
then echo "No Erros"; then printf "No Errors\n\n";
else exit_code=1; else exit_code=1;
fi fi
fi fi
done done