forked from exercism/coffeescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Ci]: Introduce ci which test exercises (exercism#202)
* test-ci * Change permissions * Fixes * Fixes * Fixed filepath * Add newline * Delete old test files * Remove install steps * Fix structure
- Loading branch information
1 parent
d4b2a3f
commit c71f43d
Showing
4 changed files
with
41 additions
and
14 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,20 @@ | ||
name: Tests | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
# Weekly. | ||
- cron: '0 0 * * 0' | ||
|
||
jobs: | ||
exercises: | ||
name: Check exercises | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | ||
- name: Install CoffeeScript | ||
run: npm install -g jasmine-node coffeescript | ||
- name: Run tests | ||
run: ./bin/test-exercises.sh |
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
test_run() { | ||
dic=$(mktemp -d) | ||
echo "Testing $1" | ||
source_file="$(jq -r '.files.solution[0]' $1/.meta/config.json)" | ||
test_file="$(jq -r '.files.test[0]' $1/.meta/config.json)" | ||
echo "source_file: ${source_file}" | ||
cat "$1/.meta/example.coffee" > "${dic}/${source_file}" | ||
cat "$1/${test_file}" > "${dic}/${test_file}" | ||
sed -i -e 's/xit/it/g' ${dic}/${test_file} | ||
jasmine-node --coffee "${dic}/${test_file}" || exit 1 | ||
} | ||
|
||
for exercise in ./exercises/practice/*; do | ||
test_run ${exercise} | ||
done | ||
|
||
if [ -d "./exercises/concept" ]; then | ||
for exercise in ./exercises/concept/*; do | ||
test_run ${exercise} | ||
done | ||
fi |
This file was deleted.
Oops, something went wrong.