Skip to content

Commit de0cfad

Browse files
committed
Setup Hello World exercise
1 parent 11503b0 commit de0cfad

File tree

8 files changed

+78
-11
lines changed

8 files changed

+78
-11
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# Requires scripts:
1414
# - bin/test
1515

16-
name: <track> / Test
16+
name: GDScript / Test
1717

1818
on:
1919
push:
@@ -23,17 +23,14 @@ on:
2323

2424
jobs:
2525
ci:
26-
runs-on: <image-name>
26+
runs-on: ubuntu-22.04
27+
container:
28+
image: exercism/gdscript-test-runner
2729

2830
steps:
2931
- name: Checkout repository
3032
uses: actions/checkout@v3
3133

32-
- name: Use <setup tooling>
33-
uses: <action to setup tooling>
34-
35-
- name: Install project dependencies
36-
run: <install dependencies>
37-
3834
- name: Verify all exercises
39-
run: bin/verify-exercises
35+
run: bin/run.sh
36+
# TODO: detect all exercises

config.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"active": false,
55
"status": {
66
"concept_exercises": false,
7-
"test_runner": false,
7+
"test_runner": true,
88
"representer": false,
99
"analyzer": false
1010
},
@@ -15,15 +15,33 @@
1515
"indent_size": 4,
1616
"highlightjs_language": "TODO: specify highlightjs language"
1717
},
18+
"test_runner": {
19+
"average_run_time": 10
20+
},
1821
"files": {
1922
"solution": [],
2023
"test": [],
2124
"example": [],
2225
"exemplar": []
2326
},
27+
"files": {
28+
"solution": ["%{snake_slug}.gd"],
29+
"test": ["%{snake_slug}_test.gd"],
30+
"example": [".meta/example.gd"],
31+
"exemplar": [".meta/exemplar.gd"]
32+
},
2433
"exercises": {
2534
"concept": [],
26-
"practice": []
35+
"practice": [
36+
{
37+
"uuid": "1adfc420-46f2-4d5b-93a3-165ede1fcd9f",
38+
"slug": "hello-world",
39+
"name": "Hello World",
40+
"practices": [],
41+
"prerequisites": [],
42+
"difficulty": 1
43+
}
44+
]
2745
},
2846
"concepts": [],
2947
"key_features": [],
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Instructions
2+
3+
The classical introductory exercise.
4+
Just say "Hello, World!".
5+
6+
["Hello, World!"][hello-world] is the traditional first program for beginning programming in a new language or environment.
7+
8+
The objectives are simple:
9+
10+
- Modify the provided code so that it produces the string "Hello, World!".
11+
- Run the test suite and make sure that it succeeds.
12+
- Submit your solution and check it at the website.
13+
14+
If everything goes well, you will be ready to fetch your first real exercise.
15+
16+
[hello-world]: https://en.wikipedia.org/wiki/%22Hello,_world!%22_program
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"authors": [],
3+
"files": {
4+
"solution": [
5+
"hello_world.gd"
6+
],
7+
"test": [
8+
"hello_world_test.gd"
9+
],
10+
"example": [
11+
".meta/example.gd"
12+
]
13+
},
14+
"blurb": "The classical introductory exercise. Just say \"Hello, World!\".",
15+
"source": "This is an exercise to introduce users to using Exercism",
16+
"source_url": "https://en.wikipedia.org/wiki/%22Hello,_world!%22_program"
17+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
func hello():
2+
return "Hello, World!"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This is an auto-generated file.
2+
#
3+
# Regenerating this file via `configlet sync` will:
4+
# - Recreate every `description` key/value pair
5+
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6+
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7+
# - Preserve any other key/value pair
8+
#
9+
# As user-added comments (using the # character) will be removed when this file
10+
# is regenerated, comments can be added via a `comment` key.
11+
12+
[af9ffe10-dc13-42d8-a742-e7bdafac449d]
13+
description = "Say Hi!"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
func hello():
2+
return "Goodbye, Mars!"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
func test_hello_world(solution_script):
2+
return ["Hello, World!", solution_script.hello()]

0 commit comments

Comments
 (0)