-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-two-fer
- Loading branch information
Showing
127 changed files
with
3,856 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
class-definitions-order: | ||
- tools | ||
- classnames | ||
- extends | ||
- docstrings | ||
- signals | ||
- enums | ||
- consts | ||
- exports | ||
- pubvars | ||
- prvvars | ||
- onreadypubvars | ||
- onreadyprvvars | ||
- staticvars | ||
- others | ||
class-load-variable-name: (([A-Z][a-z0-9]*)+|_?[a-z][a-z0-9]*(_[a-z0-9]+)*) | ||
class-name: ([A-Z][a-z0-9]*)+ | ||
class-variable-name: _?[a-z][a-z0-9]*(_[a-z0-9]+)* | ||
comparison-with-itself: null | ||
constant-name: _?[A-Z][A-Z0-9]*(_[A-Z0-9]+)* | ||
disable: [ | ||
unused-argument, | ||
max-line-length, | ||
max-public-methods, | ||
] | ||
duplicated-load: null | ||
enum-element-name: '[A-Z][A-Z0-9]*(_[A-Z0-9]+)*' | ||
enum-name: ([A-Z][a-z0-9]*)+ | ||
excluded_directories: !!set | ||
.git: null | ||
expression-not-assigned: null | ||
function-argument-name: _?[a-z][a-z0-9]*(_[a-z0-9]+)* | ||
function-arguments-number: 10 | ||
function-preload-variable-name: ([A-Z][a-z0-9]*)+ | ||
function-variable-name: '[a-z][a-z0-9]*(_[a-z0-9]+)*' | ||
load-constant-name: (([A-Z][a-z0-9]*)+|_?[A-Z][A-Z0-9]*(_[A-Z0-9]+)*) | ||
loop-variable-name: _?[a-z][a-z0-9]*(_[a-z0-9]+)* | ||
max-file-lines: 1000 | ||
max-line-length: 100 | ||
max-public-methods: 20 | ||
max-returns: 6 | ||
mixed-tabs-and-spaces: null | ||
no-elif-return: null | ||
no-else-return: null | ||
private-method-call: null | ||
signal-name: '[a-z][a-z0-9]*(_[a-z0-9]+)*' | ||
sub-class-name: _?([A-Z][a-z0-9]*)+ | ||
tab-characters: 1 | ||
trailing-whitespace: null | ||
unnecessary-pass: null | ||
unused-argument: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,41 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Synopsis: | ||
# Test the track's exercises. | ||
# | ||
# At a minimum, this file must check if the example/exemplar solution of each | ||
# Practice/Concept Exercise passes the exercise's tests. | ||
# | ||
# To check this, you usually have to (temporarily) replace the exercise's solution files | ||
# with its exemplar/example files. | ||
# | ||
# If your track uses skipped tests, make sure to (temporarily) enable these tests | ||
# before running the tests. | ||
# | ||
# The path to the solution/example/exemplar files can be found in the exercise's | ||
# .meta/config.json file, or possibly inferred from the exercise's directory name. | ||
temp_dir_base=$(mktemp -d) | ||
echo $(godot --version) | ||
|
||
# Example: | ||
# ./bin/test | ||
run_test() { | ||
slug=$(basename $1) | ||
temp_dir=${temp_dir_base}/${slug} | ||
mkdir -p ${temp_dir} | ||
# Copy relevant files to the temp directory (replace solution with example) | ||
solution_file_name="$(jq -r '.files.solution[0]' $1/.meta/config.json)" | ||
test_file="$1/$(jq -r '.files.test[0]' $1/.meta/config.json)" | ||
example_file="$1/$(jq -r '.files.example[0]' $1/.meta/config.json)" | ||
cp ${test_file} ${temp_dir} | ||
cp ${example_file} "${temp_dir}/${solution_file_name}" | ||
# Run the tests | ||
(cd /opt/test-runner && bin/run.sh $slug $temp_dir $temp_dir) || exit 1 | ||
# Check status | ||
test_status="$(jq -r '.status' $temp_dir/results.json)" | ||
if [ "$test_status" != "pass" ]; then | ||
echo "Tests for $slug have failed:" | ||
cat $temp_dir/results.json | ||
exit 1 | ||
fi | ||
} | ||
|
||
# Verify the Concept Exercises | ||
for concept_exercise_dir in ./exercises/concept/*/; do | ||
if [ -d $concept_exercise_dir ]; then | ||
echo "Checking $(basename "${concept_exercise_dir}") exercise..." | ||
# TODO: run command to verify that the exemplar solution passes the tests | ||
run_test $concept_exercise_dir | ||
fi | ||
done | ||
|
||
# Verify the Practice Exercises | ||
for practice_exercise_dir in ./exercises/practice/*/; do | ||
if [ -d $practice_exercise_dir ]; then | ||
echo "Checking $(basename "${practice_exercise_dir}") exercise..." | ||
# TODO: run command to verify that the example solution passes the tests | ||
run_test $practice_exercise_dir | ||
fi | ||
done |
Oops, something went wrong.