Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update starter files #27

Merged
merged 8 commits into from Apr 7, 2021
Merged

Update starter files #27

merged 8 commits into from Apr 7, 2021

Conversation

ErikSchierboom
Copy link
Member

  • Add version to output
  • Update README
  • Rename test directory to tests
  • Update ignored files
  • Update shell scripts
  • Simplify TODOs
  • Add sanitize option

@ErikSchierboom ErikSchierboom requested a review from a team as a code owner April 7, 2021 13:53
@ErikSchierboom ErikSchierboom changed the title Update Update starter files Apr 7, 2021
@ErikSchierboom ErikSchierboom merged commit db4483f into main Apr 7, 2021
@ErikSchierboom ErikSchierboom deleted the update branch April 7, 2021 13:56
Copy link
Member

@SleeplessByte SleeplessByte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff.

4. Build the test runner, conforming to the [Test Runner interface specification](https://github.com/exercism/docs/blob/main/building/tooling/test-runners/interface.md).
- Update the files to match your track's needs. At the very least, you'll need to update `bin/run.sh`, `Dockerfile` and the test files in the `tests` directory
- Tip: look for `TODO:` comments to point you towards code that need updating
- Tip: look for `OPTIONAL:` comments to point you towards code that _could_ be useful

Once you're happy with your test runner, [open an issue on the exercism/automated-tests repo](https://github.com/exercism/automated-tests/issues/new?assignees=&labels=&template=new-test-runner.md&title=%5BNew+Test+Runner%5D+) to request an official test runner repository for your track.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This repository has been archived by the owner. It is now read-only.

The link is a 404

3. Remove this [Exercism Test Runner Template](#exercism-test-runner-template) section from the `README.md` file
4. Build the test runner, conforming to the [Test Runner interface specification](https://github.com/exercism/docs/blob/main/building/tooling/test-runners/interface.md).
- Update the files to match your track's needs. At the very least, you'll need to update `bin/run.sh`, `Dockerfile` and the test files in the `tests` directory
- Tip: look for `TODO:` comments to point you towards code that need updating
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Tip: look for `TODO:` comments to point you towards code that need updating
- 💡 Tip: look for `TODO:` comments to point you towards code that need updating

4. Build the test runner, conforming to the [Test Runner interface specification](https://github.com/exercism/docs/blob/main/building/tooling/test-runners/interface.md).
- Update the files to match your track's needs. At the very least, you'll need to update `bin/run.sh`, `Dockerfile` and the test files in the `tests` directory
- Tip: look for `TODO:` comments to point you towards code that need updating
- Tip: look for `OPTIONAL:` comments to point you towards code that _could_ be useful
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Tip: look for `OPTIONAL:` comments to point you towards code that _could_ be useful
- 💡 Tip: look for `OPTIONAL:` comments to point you towards code that _could_ be useful

@@ -53,10 +46,23 @@ To run the tests to verify the behavior of the test runner, do the following:
1. Open a terminal in the project's root
2. Run `./bin/run-tests.sh`

These are [golden tests][golden] that compare the `results.json` generated by running the current state of the code against the "known good" `test/<test-name>/results.json`. All files created during the test run itself are discarded.
These are [golden tests][golden] that compare the `results.json` generated by running the current state of the code against the "known good" `tests/<test-name>/results.json`. All files created during the test run itself are discarded.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rename this block to:

## Verify the test runner

To test the behaviour of the test runner, do the following:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to write golden tests (snapshot tests), which is a common term used in a lot of languages / test libs / frameworks.


# Arguments:
# $1: exercise slug
# $2: **RELATIVE** path to solution folder (with trailing slash)
# $3: **RELATIVE** path to output directory (with trailing slash)
# $2: absolute path to solution folder
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The trailing slash part is probably still important. absolute only means it starts with a drive, mount or /

# Example:
# ./bin/run-tests.sh

exit_code=0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
exit_code=0
set -euo pipefail
exit_code=0


echo "$SLUG: comparing ${OUTPUT_DIR}/results"
diff "${INPUT_DIR}/results.json" "${OUTPUT_DIR}/results.json"
slug="$1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
slug="$1"
set -euo pipefail
slug="$1"

# PLACEHOLDER - Insert call to run your language tests here
# Arguments:
# $1: exercise slug
# $2: absolute path to solution folder
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The trailing slash part is probably still important. absolute only means it starts with a drive, mount or /

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants